Skip to main content

I'm trying to debug a batch COBOL program.  It stops on entry to my initial module, but when I push F5 it doesn't go to the next instruction, it runs to the end.  I've got breaks in called program so tried F8 and it also runs to the end.  This worked (F5 going to next instruction and F8 running to break) until the middle of last week.  This morning I had another developer open my project and submit the job.  For him F5 does step through the program.  So he closed and I opened and still doesn't work for me.  We both did a printenv and compared our environment variables and the only differences where our session ID and folders we are linked to.  

I'm trying to debug a batch COBOL program.  It stops on entry to my initial module, but when I push F5 it doesn't go to the next instruction, it runs to the end.  I've got breaks in called program so tried F8 and it also runs to the end.  This worked (F5 going to next instruction and F8 running to break) until the middle of last week.  This morning I had another developer open my project and submit the job.  For him F5 does step through the program.  So he closed and I opened and still doesn't work for me.  We both did a printenv and compared our environment variables and the only differences where our session ID and folders we are linked to.  

The question I meant to ask.... What configuration is tied to a user profile that is signed onto the server would impact the way that debugging functions?


The question I meant to ask.... What configuration is tied to a user profile that is signed onto the server would impact the way that debugging functions?

Hi Shane,

Can you please provide us with a little more information?

What product and version number are you using?
Under what OS and version number are you running?
Are you debugging locally on your own machine or remotely from a local machine to a remote server?
How are you starting the debugger? CBL_DEBUG_BREAK, CBL_DEBUG_START, etc?
Are the program .IDY files available to the debug session?

Thanks


Hi Shane,

Can you please provide us with a little more information?

What product and version number are you using?
Under what OS and version number are you running?
Are you debugging locally on your own machine or remotely from a local machine to a remote server?
How are you starting the debugger? CBL_DEBUG_BREAK, CBL_DEBUG_START, etc?
Are the program .IDY files available to the debug session?

Thanks

Thanks for questions, I wasn't sure what else to add.

Enterprise Developer 5.0, Version 5.0.00346, Update level: PU 16

Windows Server 2016 Datacenter64-bit / No service pack

I'm remotely connected to server and debugging locally there.  Multiple developers may be working on the box at any given time.

Starting debugger with CBL_DEBUG_BREAK

We're compiled to .gnt and .idy files are present for every module.  We also have .lst in a Listing folder.


Thanks for questions, I wasn't sure what else to add.

Enterprise Developer 5.0, Version 5.0.00346, Update level: PU 16

Windows Server 2016 Datacenter64-bit / No service pack

I'm remotely connected to server and debugging locally there.  Multiple developers may be working on the box at any given time.

Starting debugger with CBL_DEBUG_BREAK

We're compiled to .gnt and .idy files are present for every module.  We also have .lst in a Listing folder.

How are you running the application?
Is this a standalone application that you run from a script or from a command line or are you running under control of Enterprise Server?

When it stops in the first program is it stopping on a breakpoint or at the beginning of the source? If you set a breakpoint in the first program and press F8 will it stop on that breakpoint?


How are you running the application?
Is this a standalone application that you run from a script or from a command line or are you running under control of Enterprise Server?

When it stops in the first program is it stopping on a breakpoint or at the beginning of the source? If you set a breakpoint in the first program and press F8 will it stop on that breakpoint?

This is a stand alone report job that is run from a script.  It stops at the call to CBL_DEBUGBREAK.  I have several breaks in the called program which has the logic that I'm debugging.  But I also put breaks in the driver program in the clip below.  F5 and F8 function the same way, in that it runs to termination stopping at none of the breaks in the program below or in the program with the logic I need to debug.  I've confirmed that ENV-DEBUG-ON switch is set to Y to call CBL_DEBUGBREAK.  And the other developer running my setup, my script against my project is getting debugging to work, but I'm not.


This is a stand alone report job that is run from a script.  It stops at the call to CBL_DEBUGBREAK.  I have several breaks in the called program which has the logic that I'm debugging.  But I also put breaks in the driver program in the clip below.  F5 and F8 function the same way, in that it runs to termination stopping at none of the breaks in the program below or in the program with the logic I need to debug.  I've confirmed that ENV-DEBUG-ON switch is set to Y to call CBL_DEBUGBREAK.  And the other developer running my setup, my script against my project is getting debugging to work, but I'm not.

One additional thought - please double-check to make sure that you don't accidentally have the "Skip all Breakpoints" option enabled in the Debugger.  If you go to the Breakpoints View, the breakpoints normally appear with checkmarks and blue bullets on the left:

When the breakpoints are being skipped, the blue bullets will appear with slashes through them:

In case you haven't used it before, the toolbar above the list of breakpoints includes the icon with a blue button with a slash - this is how you toggle Skip All Breakpoints on and off.


One additional thought - please double-check to make sure that you don't accidentally have the "Skip all Breakpoints" option enabled in the Debugger.  If you go to the Breakpoints View, the breakpoints normally appear with checkmarks and blue bullets on the left:

When the breakpoints are being skipped, the blue bullets will appear with slashes through them:

In case you haven't used it before, the toolbar above the list of breakpoints includes the icon with a blue button with a slash - this is how you toggle Skip All Breakpoints on and off.

The skip all breakpoints is not enabled and none of the breakpoints have slash through them.

Even if the skip all breakpoints had been enabled wouldn't the F5 take me to the next instruction?

Also it looks like that is controlled at the project level.  I enabled the skip on a project then opened another project and the skip was not enabled.  When I opened the original project, the skip was still enabled.  When Bharat opened and debugged my project with no change to configuration it would have been disabled for him.  However for him the F5 and run to breakpoints worked, but still doesn't for me.

I can't find anything in any documentation that has user level configuration that overrides features on the project.  If anyone has ideas about user configuration, I can dig/research/test in that direction.  But I haven't found a starting point


The skip all breakpoints is not enabled and none of the breakpoints have slash through them.

Even if the skip all breakpoints had been enabled wouldn't the F5 take me to the next instruction?

Also it looks like that is controlled at the project level.  I enabled the skip on a project then opened another project and the skip was not enabled.  When I opened the original project, the skip was still enabled.  When Bharat opened and debugged my project with no change to configuration it would have been disabled for him.  However for him the F5 and run to breakpoints worked, but still doesn't for me.

I can't find anything in any documentation that has user level configuration that overrides features on the project.  If anyone has ideas about user configuration, I can dig/research/test in that direction.  But I haven't found a starting point

I tried debugging CICS and its working for me, but batch still isn't.  I tried deleting my batch configuration and re-adding, but that didn't help


I tried debugging CICS and its working for me, but batch still isn't.  I tried deleting my batch configuration and re-adding, but that didn't help

Hi Shane,

 

Was your colleague who successfully debugged using the same Eclipse workspace? I believe the breakpoint data is stored within the metadata for the workspace (not within the project itself). Could you try creating a new Workspace, importing your project there, and then setting the breakpoints again? Does that allow the breakpoints to catch?

 

If that does not resolve the issue, I'd recommend creating a Support Case, so that a Support Agent can investigate this problem further.


Hi Shane,

 

Was your colleague who successfully debugged using the same Eclipse workspace? I believe the breakpoint data is stored within the metadata for the workspace (not within the project itself). Could you try creating a new Workspace, importing your project there, and then setting the breakpoints again? Does that allow the breakpoints to catch?

 

If that does not resolve the issue, I'd recommend creating a Support Case, so that a Support Agent can investigate this problem further.

Figured it out... maybe.  I had created a new project before I posted the question but I made the same mistake as the original project.  I had been cleaning up our documentation for setting up a project and copied the DB name from our dev project when I should have changed it to my sandbox database. 

I found this by needing to look something up on my CICS screens but was getting an abend.  Since CICS debug worked for me I figured out that I was getting a -818 on a SQL select (time stamps generated from pre-compiler didn't match DBRM).  We figured out the wrong DB was entered on the SQL Preprocessor directives.  I pointed to the correct database and did a clean/rebuild.  This fixed my CICS issue.

So decided to try the batch debug and it now works.  However I had not tested batch debug immediately before updating the DB, so I'm not 100% certain this was the fix.  Maybe there is validation as part of batch debug that recognized the problem and prevented debug from working.  That's just my working theory.  And it doesn't explain how Bharat was able to step into the batch debug.