Bringing up the Immediate window during runtime is no problem. You can try to pause an application programmatically with either a Stop statement or a breakpoint. When placed in code, both methods will halt the execution of a piece of code and bring up the module editor, with the code line containing the Stop statement or breakpoint highlighted. You can have as many breakpoints and Stop statements in your code as you want.
Figure A.6 shows a Stop statement and a breakpoint set in the ap_AppInit() function, which is in the GlobalUtilities module.
You can't place Stop statements or breakpoints in comments, variable ...