Highlighted
Honored Contributor.
Honored Contributor.
4194 views

CBL_DEBUGBREAK

Jump to solution

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

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CBL_DEBUGBREAK

Jump to solution

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

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CBL_DEBUGBREAK

Jump to solution

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

Blair McDonald

View solution in original post

0 Likes
10 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CBL_DEBUGBREAK

Jump to solution

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

View solution in original post

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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.)

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: CBL_DEBUGBREAK

Jump to solution

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.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CBL_DEBUGBREAK

Jump to solution

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

Blair McDonald

View solution in original post

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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)

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CBL_DEBUGBREAK

Jump to solution

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?

Blair McDonald

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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...

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: CBL_DEBUGBREAK

Jump to solution

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.