Forum Discussion
You've completely surpassed my knowledge of vscode, but I'm 100% willing to help in any way I can. I use vscode for all my LM development.
I think the biggest issue is my limited Java knowledge I think if I can work out the class loading the rest should be ok
- Anonymous4 months ago
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.
- Michael_Baker4 months agoNeophyte
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?
- Anonymous4 months ago
Claude?
I didn't really understand what the container is for. The code is going to run on the collector All you need to do is post the script to the collector and then grab the output. Coretools, an internal tool used biologic monitor and briefly published then quickly revoked, does this. You can simply run a Python script, point it at a file and give it a device name or ID, and it will run the code using the debug end point. The code runs on the collector, no container needed.
Related Content
- 5 months ago
- 2 years ago
- 12 months ago
- 2 years ago