
Go-lives are a classic time where you would be encountering bugs at a very steady pace. Some bugs would be pretty straight forward where clarity on the feature would solve it, some would need a simple code fix, some would be an algorithm issue, some would be performance issue but there is a class of bug which would make you toil, tease and then push you to the limit. For e.g. the value of the variable changes unexpectedly in a process remotely linked to it. (We faced this situation actually where the workflow changed the status of a quotation and we were at our wits end to find the root cause of this).
When such a problem occurs, it is very interesting how different people react to this. Some people rerun the application many times to actually see if the problem occurs every time, some believe this problem could be because of system issue or configuration without verifying; some just throw in the towel. It is not something which is a figment of my imagination but it is very surprising as people fail to utilize the capabilities of the debugger and debugging tactics. This is because of art of debugging could not be taught and people are not sure whether they can for sure solve the issue using debugging.
Some of the keys aspects to debugging are
SAP provides a strong debugging environment. Currently there are two versions of abap debugger: Classical for release earlier than 6.40 and New available as of release 6.40.The abap debugger could be started by command /h or /hex(for system debugging) or by placing session or external breakpoints. The session breakpoints are generally are set in main session and are not effective once the session is closed. The external breakpoints are stored in database and available for 2 hours for all sessions which the users open in the application server. There is an enormous amount of documentation available on the new debugger. (I have not attached the screenshots as everything is available on them).
Apart from the breakpoints, the new debugger allows you to set watch points on specific variables. Whenever the value of the variable is changed, the debugger stops at that point unlike the breakpoint where the debugger stops at a particular line. For e.g. you have a message container, in which a new error message is added. You need to find out where the error message is added. A watchpoint would cause the debugger to stop when the error message is added to the message container. Alternatively if you know the Message class, Message no and the message type (Error/Information etc.), you can directly use the Breakpoint at Message feature in the debugger. The debugger would stop at the place where the message occurs.
The debugger offers new features such as you can specify the keywords in ABAP and the breakpoint would be automatically set for all the places where this key word occurs. There are some advanced features which ABAP debugger such as scripting. Check them out in the ABAP articles section.
I would illustrate some common debugging techniques and how they can be used in ABAP debugging:
If you are debugging object oriented ABAP, the new debugger comes very handy. You can drill down to individual instance variables, if the instance variables are also references you can further drill down to check the values of their instance variables. CRM developers would have appreciated this feature during their work.
To conclude, the debugger and the debugging techniques can ease your life. It is upto to individuals how they educate themselves with these techniques.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.