Previous Topic Next topic Print topic


Configuring and Running the Debugger

In Enterprise Server for .NET you can debug a transaction or job step in a distributed region. A distributed region comprises one or more Enterprise Server for .NET processes running on different machines against a central SQL server.

Enterprise Server for .NET does this by starting a debug SEP on the development machine and telling the region to route the transaction or job step to the debug SEP. This routing is configured in the debug properties in the Visual Studio project.

This local SEP method is used because during any debug session of a process, when a breakpoint is encountered, the entire process halts. This would be bad if, for example, a production process was used to debug against.

This method is sometimes incorrectly referred to as "remote" debugging. Enterprise Server for .NET does not currently support true remote debugging using the Visual Studio remote debug client.

Use this procedure to configure and run the debugger.

  1. In Visual Studio, create a debug-enabled version of the project.

    To do this, enable debugging for the project, then configure the output paths for the compiled debug version.

  2. Compile the debug version of the project.

    This creates the executable artefacts that the region uses during debugging.

  3. Configure the region.

    To do this, configure the region startup file to use the debug-enabled versions of the programs that you created.

    Tip:

    As an alternative, once a region is running, you can enable the region for dynamic debugging.

  4. Start the region.
  5. In Visual Studio, start a debug session and set breakpoints as needed.

    Visual Studio must be started with administrator permissions (right click Visual Studio and run as administrator).

    Failing to do so will cause the debug session to fail with the debug sep.exe process reporting access denied errors to the net.tcp port sharing service.

  6. If debugging a CICS transaction, attach a terminal and run your transaction. If debugging a batch region, execute the JCL that invokes the program you want to debug.
  7. In Visual Studio, use the tools available to step through your code and set and clear breakpoints as required.
Previous Topic Next topic Print topic