Author Posts

August 20, 2018 at 6:52 pm

I have installed PS tools and PS pro tools for Visual Studio 2017 and was hoping that I could use VS to both edit and also run and debug powershell scripts, however so far I have not found the way to run and debug a single Powershell script from inside VS 2017. Is this feature available at all within PS tools for VS 2017 or I am just expecting too much?

August 20, 2018 at 7:35 pm

I've done work on C# modules in Visual Studio, but the preferred software for Powershell currently is Visual Studio Code, not the full Visual Studio:

https://blogs.technet.microsoft.com/heyscriptingguy/2016/12/05/get-started-with-powershell-development-in-visual-studio-code/

https://docs.microsoft.com/en-us/powershell/scripting/core-powershell/vscode/using-vscode?view=powershell-6

Code allows you to use F8 to execute code similar to the Powershell ISE with a Powershell emulator already attached.

August 20, 2018 at 7:43 pm

See this discussion and answer.

Create the file C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.config:

'stackoverflow.com/questions/4106881/cant-debug-powershell-through-visual-studio'

And view this video …

PowerShell Tools for Visual Studio
'youtube.com/watch?v=eRILgGQb_hQ'