In a previous post we talked about putting an infinite loop in code to debug programs running in background. However, sometimes it is a little cumbersome to go into debugging mode.

An alternative to see if a code is working is causing it dump. Message type ‘X’ can be used to accomplish that.

MESSAGE ‘write_any_message’ TYPE ‘X’.

If the code hits, the dump can be seen at ST22.

One of biggest advantages is that unlike infinite loop, developer doesn’t need to worry putting pressure on system. If he forgets to comment the code, at maximum it will lead to dumps which is a way better alternative when compared to long running threads exhausting resources.