Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How does JDBG work?

former_member221827
Active Participant
0 Kudos

Hi all,

I was hoping someone could clear up what is going on behind the scenes when I select a background job in SM37 and type JDBG in the command line.  I'm still a bit new and didn't follow what was going on tracing it through the debugger.

To clarify I understand what the purpose of it is, but I don't like thinking of it as "I type that into the command line and then by magic I hit my breakpoint in my background process".  I have not been able to find a lot of info about it other than a lot of threads stating that's how you debug background processes.

Thanks much,

-Chris

1 ACCEPTED SOLUTION

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

Note 573128 provides some information about debugging programs in background.

It provides the following information about JDBG:


1. Select a job in transaction SM37. In addition, set a breakpoint at the point in the source code that you want to analyze when debugging. In SM37, enter JDBG in the OK code field, and choose ENTER. The selected job is now started in debug mode, and the debugger initially stops in a system program. Choose F8 to continue the job up to the next breakpoint.

Caution: Although the job still appears in SM37 in the previous status after debugging, the entire job (or, more specifically, a copy of it) has run during debugging and possible database changes are effective as a result of the job.

BR
Caetano

2 REPLIES 2

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

Note 573128 provides some information about debugging programs in background.

It provides the following information about JDBG:


1. Select a job in transaction SM37. In addition, set a breakpoint at the point in the source code that you want to analyze when debugging. In SM37, enter JDBG in the OK code field, and choose ENTER. The selected job is now started in debug mode, and the debugger initially stops in a system program. Choose F8 to continue the job up to the next breakpoint.

Caution: Although the job still appears in SM37 in the previous status after debugging, the entire job (or, more specifically, a copy of it) has run during debugging and possible database changes are effective as a result of the job.

BR
Caetano

0 Kudos

Hi Chris,

     Just bear in mind, if you would like to debug the background job in SM37, the job should not execute immediately. You have to set the time delay for few seconds so that you have enough time to key the JDBG in command line for the debugging mode.

Thanks

Wong