cbl_debugbreak not working

[Migrated content. Thread originally posted on 07 June 2011]

Hi,

I am using the cbl_debugbreak call in the code.

I have created an executable which I am testing , how ever the code does not seem to stop at the call , what could be missing ? the idy file is in the same directory as well.

This used to work effortlessly in Netexpress 3.1 how ever in 5.1 it seems to ignore it.

I am developing a transaction monitor service application executable using fujitsu UTM .

Thanks for your help.

PTeng
  • Hi,
    It could be a registry issue. Can you check you have an entry in

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\NetExpress\5.1\COBOL\5.1\Config (if you're not running on a 64bit OS you should omit the Wow6432Node)

    You should have dynamic_debug_cmd_ptrace with a value of "C:\nx51\Base\BIN\Mfnetx.exe" /JITP:%%P%lX%%%lX (obviously the path will be different)

    Keith
  • Hello Keith,

    I have the below registry node

    HKEY_LOCAL_MACHINE\SOFTWARE\Micro Focus\NetExpress\5.1\COBOL\5.1\Config with key and value

    dynamic_debug_cmd_ptrace = "C:\Program Files\Micro Focus\Net Express 5.1\Base\BIN\Mfnetx.exe" /JITP:%%P%lX%%%lX

    I do not have the entry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\NetExpress\5.1\COBOL\5.1\Config

    Thanks
    -PTeng
  • Thats a shame. I could only get it to fail on my machine by removing that entry...
    You could check the setting of 'error handling' in the Animate options dialog. You could also try coding an error in your program - eg. call a nonexistent program - as this should trigger the same mechanisms.
  • Thats a shame. I could only get it to fail on my machine by removing that entry...
    You could check the setting of 'error handling' in the Animate options dialog. You could also try coding an error in your program - eg. call a nonexistent program - as this should trigger the same mechanisms.
  • hello again,

    Not sure where is the Animate "error handling" options, in fact one of the condition in the code that I am trying to debug is that a cobol code (in form of a .dll) that I am trying to invoke is giving a run time error 173 although the dll is in the same directory. One more thing I would like to mention is that If I build a stand alone .exe composed of a single cobol program with a cbl_debugbreak in, it triggers the animator window, how ever when the executable that I am testing is composed of a c code object (generated from visual studio) and cobol objects generated from Netexpress 5.1 it does not seem to work. Could it be any other setting / environment variable ?
  • Are you compiling this as a 64-bit executable using P64 directive?

    You might try starting the IDE and selecting Wait for animatible attachment from Animate Settings and then press start animating.

    When cbl_debugbreak is hit it should start.
  • Hello,

    Its a 32 bit code.
    I did try "wait for animatable attachment" option too, but that too did not help.
    Could it be to do with any of my environment variables ?

    -Pteng
  • The RETURN-CODE is set to 000000001 after the call (obviously indicating that the call failed), how ever the rest of the program code executes successfully.
  • The RETURN-CODE is set to 000000001 after the call (obviously indicating that the call failed), how ever the rest of the program code executes successfully.
  • Is this application running under control of a Windows Service under Windows 7?
    There are some issues with doing this because Microsoft changed Windows so that Windows Services can no longer interact with the desktop and therefore cbl_debugbreak will not work.

    I have seen this problem with trying to use cbl_debugbreak to debug a DB2 stored procedure under Windows 7. It will not work because DB2 is running as a Windows Service...