As subject indicates, I’m wanting to use VSCode to develop PSU scripts, but I don’t know how to access variables/secrets stored in PSU.
And a more general question is: beyond basic connectivity between VSCode and PSU (configuring token), are there other steps I need to do for full interoperability? And are there other limitations using VScode I’m not aware of? Is there a kb explaining?
PSU does not return secret values out of the platform. If you are attempting to run those scripts on your local machine, you won’t have access to any variables provided by PSU because it’s using the standard PS execution and not the PSU execution engine.
That’s correct. You’d have to use that work around.
The extension could be improved to make this more seamless. The local VS PowerShell extension doesn’t know about all the PSU configuration, so it just executes the script like any other local script.
What we should do is enhance the PSU VS Code extension to provide a way to make remote execution appear local, similar other remote debugging\editing extensions.
I opened an issue to track this because I think it would be extremely helpful. PSU’s editor and debugger are okay but will never be as functional as VS Code.
@adam After working with PSU for past week, I agree that better integration with VSCode would be highly beneficial. The built in debugging / intellisence, etc are just not close to VSCode. I’d upvote it if there is a way.