How to debug the background job in SAP?

Sometimes we have to know what happen in background job when a issue occurred, there are two ways to debug the program in the background job:

1. go to SM50, choose you job in runing(type:BGD), and go to 'program->debuging'.

2. set break-points in your program, then go to 'SM37', chose a finished job and type in 'JDBG' in the command line ( no '/' ), put the cursor on the job and press enter - will
take you to the job in debug mode.

[@more@]
请使用浏览器的分享功能分享到微信等