Forum Discussion
Please implement this as a vscode extension as well.
I am looking for time to toy with an idea my java is not good though
VSCode load up a devcontainer with groovy-guru and python then copy all the JAR's from a collector into that repo under lib/ then load lib as a extra class path in the extension so IntelliSense picks it up hopefully???
Then python script that reads what ever the file is and uses the collector debug facility to execute the code on the target collector and device and output to stdout
Very rough idea but anyone tried?? think it might work before I go the effort?
- Anonymous4 months ago
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.
- Michael_Baker4 months agoNeophyte
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.
Related Content
- 5 months ago
- 2 years ago
- 12 months ago
- 2 years ago