Newb question, Intellisense for component modules when developing in VS Code extension

I am testing out different modules from the marketplace for PU. I install the modules through the gui, and then install them to the dashboard that i am using. But when I go into the PU extension for VS Code, i don’t get intellisense for those component modules. Nor do i get help. I get the error that help cannot be found for the command. (Eg. new-udeventlogtable)
I have had this issue for a while where Intellisense while developing in the PU extension does not work, even though the command i am using works when i start the dashboard. Obviously i am doing something wrong when loading the component modules. But i cant figure out what it is.

Do i need to have all of the added modules in my powershell profile for autoload in order to get intellisense when developing? It seems like installing the modules through the GUI does not necessarily install them to the POSH on the host computer. Please tell me what i am missing.
Thank you.

Product: PowerShell Universal
Version: 1.5.16

If you turn on Local Editing in the PSU extension settings, it will auto-import the modules when you open a dashboard via VS Code.



Ah, thank you very much. interesting, i would have thought that since i was developing in the instance on my local machine that i wouldnt need that. but apparently i do.

It’s also possible to set the PSModulePath to include the C:\ProgramData\PowerShellUniversal\Dashboard folder or use Install-Module to save the components. We use Save-Module internally when installing through the admin console.

OK, so installing components via the gui just installs them in the PU instance, correct? if i want them available in my normal powershell i need to use Install-Module. i am still working to understand the scoping in PU.

Yep. Exactly. It stores them into the PSU instance but doesnt add them globally to the PS environment. Primarily this was done so you could run multiple isolated instances of PSU on a single machine but you’re not the only one running into this issue.

It seems like maybe the default behavior is too complicated.

I dont know if it is too complicated. it makes perfect sense when you explain it that way. Maybe offer an option when installing via the gui to load it into the local POSH profile as well? Or an info link in the marketplace that shows a warning about where the module actually loads?

Yeah those are good ideas. I did think of installing it to the profile via some setting in the GUI before but never implemented it. I’ll open an issue to track this.