Question
· Aug 26, 2019

Debugging in Visual studio code using Serenji.

Can you please provide steps to debug in VS code using serenji and how to put break point in VS code, I have tried using F9 but it is not working.

I want to debug API code using postman.

Discussion (1)1
Log in or sign up to continue

To use the debug features of Serenji you will need a keyfile issued by us at George James Software. Free evaluation keyfiles are available on request, normally lasting 30 days. On the Extensions section of VSCode, select the Serenji extension and follow the link in the "Installation" section to get full instructions.

I'm guessing you opened a CLS file that implements your API, which I assume is a REST one. For debugging we use InterSystems' native debug support, which operates on the INT code that your class compiles into. Depending on how you compile your class, that INT code might not have been retained. After all, it is "intermediate" code from which the runtime OBJ code gets generated. The documentation I pointed you to above explains how to keep INT code.

With Serenji VSCode's F9 key (Toggle Breakpoint) currently only operates when you are in an INT file. It's on our roadmap to add support for the setting of breakpoints in CLS source.

Also on our roadmap is the addition of a mechanism to let you debug the web gateway's server-side process that services your Postman request. Meanwhile you may be able to use Serenji's 'Existing Process' debug configuration to attach to the right server-side process, but it's challenging to pick the right one. Alternatively, use the 'ClassMethod' debug configuration and call directly the server-side classmethod that implements the method in your REST API.