Problem:
You may have rebuilt your project in Net Express 6.0 to include a CBL_DEBUGBREAK statement and produced an INT or GNT file.
However, when you run this application and the CBL_DEBUGBREAK statement is reached, it is Microsoft Visual Studio that launches to debug the application.
Resolution:
It is necessary to change a registry key to do this.
1. Preliminary Information
It is advised that the registry key is copied or exported before making any changes.
The registry entry that needs to be changed is:
Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Micro Focus\\Net Express\\6.0\\COBOL\\6.0\\Config
or: "HKLM\\SOFTWARE\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config"
For 64bit:
"HKLM\\SOFTWARE\\Wow6432Node\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config"
The Registry Value name to be changed is:
"dynamic_debug_cmd_ptrace"
The following command can be used to find out what the current setting is (from a DOS command prompt):
reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace
For 64bit:
reg query "HKLM\\SOFTWARE\\Wow6432Node\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace
You can export the current 'config' registry key with 'Reg Export'.
You can also make a copy of the 'Config' key in the registry with 'Reg Copy".
(Type "reg /?" for more info on the 'reg' commands.)
(Alternatively you can use 'regedit' to rename/export/copy the key/value.)
EG:
reg export "HKEY_LOCAL_MACHINE\\SOFTWARE\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" MF_Debug_Config.reg
For 64bit:
reg export "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" MF_Debug_Config64.reg
2. To set the required Debugger
Set the String Value "dynamic_debug_cmd_ptrace" (under the above Config key) to the required value as follows:
To set Net Express as the default debugger:
reg add "HKLM\\SOFTWARE\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace /t REG_SZ /d "\\"C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Base\\BIN\\Mfnetx.exe\\" /JITP:%%P%lX%%%lX"
For 64 bit:
reg add "HKLM\\SOFTWARE\\Wow6432Node\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace /t REG_SZ /d "\\"C:\\Program Files (x86)\\Micro Focus\\Studio Enterprise Edition 6.0\\Base\\Bin\\Mfnetx.exe\\" /JITP:%%P%lX%%%lX"
To set Visual Studio as the default debugger (this is the default setting) :
reg add "HKLM\\SOFTWARE\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace /t REG_SZ /d "\\"C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Base\\BIN\\mfjitvs.exe\\" %%%lX%%%lX%%%lX"
For 64 bit:
reg add "HKLM\\SOFTWARE\\Wow6432Node\\Micro Focus\\NetExpress\\6.0\\COBOL\\6.0\\Config" /v dynamic_debug_cmd_ptrace /t REG_SZ /d "\\"C:\\Program Files (x86)\\Micro Focus\\Studio Enterprise Edition 6.0\\Base\\BIN\\mfjitvs.exe\\" %%%lX%%%lX%%%lX"
[Note that the above commands would need to be modified if your installation is not at the above default location, i.e. you would need to substitute the correct program path to your Base\\BIN directory.]
3. 64-bit Information
The equivalent registry strings for a 64-bit windows are provided above
See also article 14921
#netexpress
#EnterpriseServer
#Server
#StudioEnterpriseEdition
#COBOL
#Enterprise
#ServerExpress