Highlighted
Super Contributor.
Super Contributor.
1472 views

Conditional Breakpoints in managed COBOL

Jump to solution
Do Conditional Breakpoints work in managed COBOL? I set a breakpoint on a line of code, right-click the red ball icon an select "Condition...", and enter the desired condition (using the same syntax as I used in Net Express): SEL-ERATE='EMN2 '. Execution just blows right past the Conditional Breakpoint. When I set a Regular Breakpoint at the next line of code and execute, examining the value of SEL-ERATE at each stop on the Regular Breakpoint and then clicking "Continue", I eventually get to where SEL-ERATE is "EMN2 ". BUT the Conditional Breakpoint on the immediately preceding line of code didn't catch it! What am I missing here?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Conditional Breakpoints in managed COBOL

Jump to solution

Yes, this might be related to the pother debug issues that you raise and it might be dependent on something in your code.

If you wouldn't mind can you create a small test project like a managed console app that only contains a couple of lines and try the same test with it?

If it works on the small project then it is most likely something in your converted project that is causing these problems.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Conditional Breakpoints in managed COBOL

Jump to solution

I just tested this here and the conditional breakpoint worked fine in managed code using just what you described. I tested with VC for VS2015 2.3 update 2.

What version are you using?

0 Likes
Highlighted
Super Contributor.
Super Contributor.

RE: Conditional Breakpoints in managed COBOL

Jump to solution

VC for VS2013 2.3 Update 2.

I just did a parallel test between a native COBOL .dll and its managed COBOL class counter part.  I set two breakpoints in each on the same lines of code.

The first break point is conditional on a variable (Group Item) being equal to a specific value.  The second breakpoint is regular a couple of lines down.

The conditional breakpoint works in the native COBOL program, stopping when the variable's value is equal to the specified value.

The conditional breakpoint in the managed COBOL never gets triggered.  I can examine the content of the variable at the following regular breakpoint and see that it has been set to the conditional breakpoint's specified value, but apparently the conditional breakpoint can't see the value or can't signal for a stop.

Could this be related to my issue with not being able to see IO status when hovering over a file name?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Conditional Breakpoints in managed COBOL

Jump to solution

Yes, this might be related to the pother debug issues that you raise and it might be dependent on something in your code.

If you wouldn't mind can you create a small test project like a managed console app that only contains a couple of lines and try the same test with it?

If it works on the small project then it is most likely something in your converted project that is causing these problems.

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

RE: Conditional Breakpoints in managed COBOL

Jump to solution

Yes, I will try to create a simple example for both the File Status and conditional breakpoint issues and, if successful, submit as an incident to SupportLine.

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.