In order for the
Micro Focus COBOL extension to work with .NET Core projects, you need the following software installed:
- A licensed installation of one of the following Micro Focus products, release 7.0 or later:
- Visual COBOL for Visual Studio or
Enterprise Developer for Visual Studio
- Visual COBOL Build Tools or
Enterprise Developer Build Tools
- Visual COBOL Development Hub or
Enterprise Developer Unix Components
Note: Visual COBOL for Eclipse, COBOL Server,
Enterprise Developer for Eclipse, and Enterprise Server are not supported.
- Microsoft's C# extension version 1.23.12 or later for
Visual Studio Code.
- Other software requirements - see the product Help of
Visual COBOL for Visual Studio or
Enterprise Developer for Visual Studio for any requirements for compiling .NET Core projects.
Register COBOL debugging support
Before you can debug .NET Core projects, you need to register the COBOL debugging support. You only need to do this once.
- Invoke the
Visual Studio Code
Command Palette widget - click
- Scroll down and select the
Register COBOL support with .NET Core debugger (vsdbg) command.
This adds the COBOL support to the .NET debugger. If Microsoft's C# extension is not installed, this action will install it
Debug a .NET Core COBOL project
To launch debugging, we must define a launch configuration in the
Compile .NET Core COBOL Projects for information about how to create a
launch.json file for your project.
- Note that the
launch.json file includes launch configuration of type
coreclr which is provided by the C# extension. The following is an example of a launch configuration:
"name": ".NET Core Launch (console)",
"preLaunchTask": "COBOL: dotnet build",
// Specify the executable that should be debugged below
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Run > Start Debugging and debug your project in the usual way.