Forum Discussion
You only need the class loading if you want to use the IDE to help. I've never used vscode with the classes loaded, so I'd say make that a secondary priority. More important would be the ability to actually test the code and grab the output back into vscode. It's not actually too hard. You just gotta post to /debug.
Query params: collectorId=x
json payload:
{"cmdline":"!groovy hostId=760 \n println(\"Hello world\")"}
So we'd need a way to store the creds in vscode (maybe a .env file in the workspace). We'd need a way to select a device. That might involve some back and forth searching by name since what we actually need is the system.deviceId (that could also be future enhancement). And we'd need a dropdown to pick groovy or powershell (!groovy or !posh).
The output contains "output", "sessionId", "cmdline", and "cmdContext". Would take some testing to see what the results would look like when the script has an exception.
hmm good point that is why I was leaning on devcontainer give a tmui or the likes see the bottom of this? say ./test_thing.py gives you a searchable tmui or something
As for the debug endpoint I use it daily II have not looked at the exception handling yet though
Can Claude do this all for us?