Class Debugging in Terminal
Hey all!
I was wondering if anyone had any input on how to troubleshoot classes in a terminal session? I'm currently writing an "adapter" so that way we can encrypt and decrypt files through GNUPG (PGP keys).
I currently have a %RegisteredObject class for this and am running into the excruciating pain of testing this. Every time I make a change on the RegisteredObject I have to renew the class and all of its properties in order to test the newly compiled code that I have written. I know that this doesn't seem like too much of a hassle, but after doing it multiple times it becomes tiring.
Is there something that I'm missing or a painfully obvious way that I'm doing this incorrectly? Any input on this would be greatly appreciated!
Hi @Jordan Everett !
You can debug in terminal using ZBreak And Break commands.
E.g. insert in the ObjectScript code a new line where you need to step-by-step debugging:
Break "L"
which means turn on interactive terminal debugging with line-by-line mode
and use "go" command to run the line of code.
Hi. Not entirely sure what you mean, but I usually write a noddy test routine to clear variables, set up objects and properties, run methods, display, compare results, etc. Have it open in Studio alongside the classes being edited. Then call from terminal. Note that to save typing <ctrl>P can be used to get the previous entries at the command line (and <ctrl>N for next) and allow editing. Alternatively, for repeated test cases I often just copy and paste code from Word or OneNote. / Mike
Thank you both! I think both have there own uses. I will make sure to use both of these methods in the future.