So you know how to debug and all is going well until a pop-up (dialog box) appears and exits your debugging session. There is a simple trick to switch on debugging once you reach a pop-up, proceed as follows:
Create a TXT file and save it on your desktop with the following command:
Then if you want to activate debugging on a pop-up/dialog box, simply drag and drop the TXT file from your desktop onto the pop-up/dialog box in SAP. Next time you press enter you will be back in your debugging session. Happiness.