Saturday, March 11, 2017

ABAP Debugger


Debugger

There are basically two options how to use a debugger. You can either start the debugger when you set a session break point in your code while using se80 or se38. When you run the program additional window with (new) debugger will show up.
The other method to is enter one of these following codes into command field just before you run the report:
  • /h – basic and most used command which will run the debugger
  • /hs – start debugger and allow system debugging
  • /ha – start debugger, skip screen handling and start directly debugging ABAP code
  • /hmusa – start debugger and create memory snapshot which can be analysed in transaction S_MEMORY_INSPECTOR

debugger
S_MEMORY_INSPECTOR – Memory inspector
We are able to generate a memory snapshot from any report or ABAP debugger and then analyse it in S_MEMORY_INSPECTOR transaction. Apart from /hmusa mentioned above, we can also use following techniques to generate memory snapshot:
  • To create snapshot from any running program, we need to select main menu > System > Utilities > Memory Analysis > Create snapshot.
  • To create snapshot from ABAP debugger, we need to start memory analysis tool, select tab Memory Objects and generate snapshot. (more info on memory analysis tool can be found here)
Once the snapshots are generated, we can analyse them and compare them. It can help us to find any memory leaks or discover why the memory consumption is unexpectedly increasing over time.
memory_analysis

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...