You can use Visual Studio Code as the just-in-time (JIT) debugger in the following scenarios:
JIT debugging support has the following requirements:
You can register Visual Studio Code as the JIT debugger in one of the following ways:
By default on Windows, the Micro Focus COBOL or Enterprise product installed on your machine is the default JIT debugger for COBOL applications. You can register Visual Studio Code as the JIT debugger on your machine as shown below if you want to use it for JIT debugging without using the COBCONFIG environment variable:
This replaces the value specified by the main COBOL product installation to use either Eclipse or Visual Studio as debugger.
To restore the original value of the JIT debugger for COBOL:
This unregisters the Visual Studio Code JIT debugger.
In addition, if you have either Visual COBOL for Eclipse or Enterprise Developer for Eclipse installed, you must disable the Enable JIT debugging setting from Preferences > Micro Focus > COBOL > Debug.
You can use Visual Studio Code as the JIT debugger if you create a COBOL run-time configuration file with the location of the JIT debugger, and then set the COBCONFIG environment variable to that file. This ensures that Visual Studio Code will be launched for just-in-time debugging.
set debugger_command="extension-folder\\bin\\debugadapter\\win-x86\\MicroFocus.VsCodeDebugProtocol64.exe %%P%X"
You must specify extension-folder as a full path. The name of the extension in the extensions folder is micro-focus.amc.mfcobol-<version>.