Debugging .NET COBOL Applications Remotely

You can use Visual COBOL installed locally to debug a .NET COBOL application running on a remote Windows machine.

Note: The remote application must run on Windows.

To prepare for debugging

Ensure that you have the following installed on your local machine:

  • Visual COBOL
  • The application's project file or symbols (either .idy or .pdb). You do not need these files if you are going to use Attach to Process.
  • Establish a connection between your local machine and the remote one - click here for instructions.

Ensure that you have the following on the remote Windows machine:

  • The application's binary files.
    Note: In order for you to obtain useful information during debugging, you should compile your application's binary files with the ANIM Compiler directive must have been produced with the debug information; you must have compiled the applications .
  • Microsoft's Remote Tools that match the version provided with Visual Studio installed on your local machine - click here for instructions on how to install and set up the remote debugger.
  • MicroFocus.COBOL.ExpressionEvaluator.Remote.dll - you need to copy this file from the Visual Studio installed on your local machine and copy it to the same folder on the remote machine:
    1. On your local machine, navigate to %Program Files%\Microsoft Visual Studio\2017\Professional\Common 7\IDE\Remote Debugger\x86 (or \x64, depending on whether you are debugging a 32-bit or a 64-bit application).
    2. On the remote machine, navigate to the same folder that has the remote debugger installed (such as %Program Files%\Microsoft Visual Studio 15.0\Common 7\IDE\Remote Debugger\x86 (or \x64)) and copy the .dll file to it.

To debug a .NET COBOL application remotely

These are the instructions to debug an application that runs on a remote machine:

  1. On your local machine, start Visual Studio.
  2. Either create a new .NET COBOL project or open the one that was used to create the application you want to debug.
  3. Configure your project for debugging:
    1. Navigate to the project's properties and click the Debug tab.
    2. Under Start Action, specify the Start project.
    3. Under Start Options, check Use remote machine and specify the name (or the IP) and the port number of the remote machine as used by the Remote Debugger - such as machinename:4022.
    4. Under Debug Options, check Disable Windows authentication for remote debugging if you want to avoid having to provide credentials when connecting to the remote debugger. You need to ensure that the remote debugger is also configured to run without Windows Authentication. This can be useful in scenarios where it is not possible to set up the required credentials.
      Warning: Enabling this option in the remote debugger makes your remote machine accessible to other users on the network.
  4. On the remote machine, create a folder structure to match the path to the bin\Debug folder of the application on your local machine.
  5. Copy the application's binary files to that folder.
  6. Start Microsoft's Remote Debugger application on the remote machine - click here for instructions.
  7. Start debugging in Visual Studio on your local machine.