Visual Studio Code Debugging
I am currently trying to better my development process by using Visual Studio Code because I'm more familiar and comfortable with it than Studio.
I've followed the guide here, but I'm still having issues. I initially didn't have the Web Socket protocol allowed on my Web Gateway server, but I enabled that and restarted the server with no luck.
Am I just on too old of a version? Is there any way I'd be able to use Visual Studio Code and be able to debug with what I currently have? I wish I could upgrade to IRIS, but that doesn't seem to be an option.
I am able to query processes on my server to attach to them, but after I select a processId it just loops endlessly not doing anything. I've tried debugging through a launch instead of an attach and it is the same behavior.
Any help in this matter would be greatly appreciated!
https://community.intersystems.com/post/debug-objectscript-code-using-vs...
I have followed your post and unfortunately haven't had any luck. It seems to get put into the Call Stack but nothing happens after that. Here is an image of what it currently looks like on my debug:
I also turned on debugging and this is the information I got in the globals:
Can you generate the debug log with these instructions?
Troubleshooting Debugger Issues
If you are experiencing issues using the debugger, please follow these steps before opening an issue on GitHub:
zn
to the namespace containing the class or routine you are debugging.Kill ^IRIS.Temp.Atelier("debug")
, thenSet ^IRIS.Temp.Atelier("debug") = 1
to turn on the Atelier API debug logging feature. If you are on Caché or Ensemble, the global is^CacheTemp.ISC.Atelier("debug")
.^IRIS.Temp.Atelier("debug")
global and add it to your GitHub issue.Kill ^IRIS.Temp.Atelier("debug")
, thenSet ^IRIS.Temp.Atelier("debug") = 0
to turn logging back off again.Yes I can.
Here is the log from when I connect to my CSP gateway (HTTPS):
"Event:init|<init appid=""AtelierDebugger"" idekey=""Atelier"" session=""20592"" thread=""1"" parent=""Cache for Windows (x86-64) 2017.2.2 (Build 865_3_20793U) Thu Apr 15 2021 16:04:37 EDT"" language=""COS"" protocol_version=""1.0"" fileuri=""file://""> <engine version=""1.0"">%Atelier.XDebugAgent</engine> <company>InterSystems Corporation</company> <license>Copyright 2015 InterSystems Corporation</license> <url>http://www.intersystems.com</url> <copyright>Copyright 2015 InterSystems Corporation</copyright></init>"
Here is when I do it when I connect directly to the server through port 57772:
Hi @Jordan Everett. Version 2017.2 should work fine. It's not too old of a version. Did the @Yuri Marx article help?
Hey @Raj Singh,
It was very helpful and a wonderful source of information, but I'm still not able to debug anything through VSCode. It seems like it will attach or launch but then will never hit my breakpoint and allow me to actually debug the process
Alright, I figured out that the problem is due to my CSP Web Gateway.
I switched my server connection to go directly to the server through the private apache web port. It worked without any issues! Does anyone have any guidance on what application access I'm probably missing on my CSP Gateway?
Do you have /api/atelier defined?
I believe I do. If I didn't, I wouldn't be able to query anything using Visual Studio Code correct?
Debugging uses WebSockets, so, make sure that your web server is configured properly for WebSockets.
I have confirmed that. It even shows that it is upgrading to a websocket connection in the HTTP trace.
Hi Jordan,
You can also use Serenji when debugging in VS Code - https://openexchange.intersystems.com/package/Serenji
It's an on-the-spot debugger from George James Software, with zero configuration for users - so you can debug whenever, wherever you are without losing focus. It also takes advantage of the latest features within VS Code itself such as CodeLenses.
Our YouTube channel has a Serenji playlist which shows off how some of these features work - https://www.youtube.com/@GJSoftware/featured
Happy to chat if you're interested in finding out more!
Thanks, Laurel
Just checking, do you have ObjectScript Language server extension installed? It's necessary to make debugger work
Yes I do. I have all three extensions installed. My issue only seems to happen whenever I'm trying to go through my CSP gateway. If I connect directly to the server, then it works.
I figured it out! It turned out to be a SSL/TLS misconfiguration between my gateway and my server.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue