To start debugging in Studio, you first have to set your method as a debug-target : right-click on the method header and choose 'Set DoMyWork as debug target'.
Then set a breakpoint anywhere in the method you want to start debugging (click on F9 to toggle breakpoints)
Then start the debugger in the menu or Ctrl-F5.
If you want to call your method with some predefined arguments, it is better to create another method that will call ..DoMyWork(.arg1, arg2) and use this method as your debug-target, or better, in the debug menu, click on debug-target and add proper arguments in the classmethod.
If you wish to debug in terminal, you need to use the command Break with some options :
^
<BREAK>zDoMyWork+1^...
USER 2d1>
Option S or L with + or - depending if you want to debug instruction by instruction (S) or Line by line (L), debug into methods (+) or execute them(-).
Use G (or Goto) to go step by step, Use Break "C" to clear debugging.
More info on Break : https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_debug
- Log in to post comments
.png)