CBL_DEBUGBREAK

HI,

I'm using "Enterprise Developer 2.2 Update 2" , when I call gnt program from a batch script dos,  compiled with ANIM (32 bit) the statement 

 CALL "CBL_DEBUGBREAK" dont'  work, don't give error, symply ignored!

It is possible in Visual Cobol do debug from command line( like a NX (MFNETX))

thx

  • Verified Answer

    CBL_DEBUGBREAK should work the same way for native programs in Visual COBOL as it does in Net Express but you might have to turn on the JIT debugging in Visual Studio.

    Navigate in the Visual Studio IDE to Debug-->Options-->Just-in-Time and ensure that the MF Native Debugger is checked.

    Try again and see if it prompts you to debug when the CBL_DEBUGBREAK is executed.

    Also take a look at the video:

    Visual COBOL In a Nutshell: Debugging in Visual Studio Advanced

  • i'm using Enterprise Developer 2.2 Update 2 under Eclipse is the same?

    (after i would release dll, gnt and exe on Cobol Server 2013 on windows 2012.)

  • Where are you executing the Dos script? On your PC or on the server?

    If on your PC, does it point to the server loadlib?

    If you execute the Dos script on the server, the execution will be on the server. As COBOL Server 2013 is not a debugger  tool it will ignore that statement.

    Ensure Allow Dynamic Debugging is selected on your Server.

  • i'm running from dos script on the same server where is Enterprise Developer 2.2 for eclipse.

    in loadlib there is GNT and IDY file..

    thx

  • Verified Answer

    Hello mf-galberico,

     

     

    For Eclipse, the same concepts apply, but the way you enable the Just In Time debugging is different. Please see the following video, which covers this topic.

      

    Visual COBOL In a Nutshell: Debugging in Eclipse Advanced

  • now the enterprise developer starts when find

    CALL "CBL_DEBUGBREAK"

    (compared to net Express it is very slow)

    , but eclipse give error and cannot start debug:

    !ENTRY org.eclipse.equinox.registry 4 1 2015-10-20 10:45:13.632

    !MESSAGE Plug-in com.microfocus.eclipse.coboljvm.ui was unable to load class com.microfocus.eclipse.coboljvm.ui.debug.ToggleBreakpointsTargetFactory.

    !STACK 0

    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.microfocus.eclipse.coboljvm.ui (235).

    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)

    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)

    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)

    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)

    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)

  • I have also this error:

    Could not open the editor: Cannot instantiate input element factory com.microfocus.eclipse.ui.context.CopybookFileStoreEditorInputFactory for editor id=com.microfocus.eclipse.editor.cobol.CobolEditor name=MIOPROG.CBL

  • Hello mf_galberico,

    Have you exited Eclipse before trying to run the program at the command prompt?

    Did you start your command prompt using this option from the Start menu:

       Start-> Micro Focus Enterprise Developer ->  Tools -> Enterprise Developer Command Prompt (32-bit)

    Does this work properly if you debug the program inside Eclipse (instead of running from the command line)?

    Finally, as an experiment, you might try creating a new Workspace in Eclipse, create a COBOL project, and add a simple Hello World COBOL program, with the call to CBL_DEBUGBREAK. Are you then able to invoke CBL_DEBUGBREAK from a program run at the command prompt?

  • hi,

    now the debugger with JIT work fine.

    I thank you for the advice, in fact I tried to make a new project in new workspace with only one program and now JIT start and I can debug..

    I'm starting to get a feel with Eclipse... after i go to use Visual Studio.. very interesting!

    thanks...

  • hi,

    the debugger did not work because I had changed the %TMP% variable pointing to a directory that does not exist !

    Now work all and fine...

    thanks.