Loading…

Local Debugging

Executing the Debugger

Run from a PowerShell Project

With PowerShell Tools for Visual Studio, a couple new project templates are included. When working with a script that is part of a PowerShell project, you can execute the current script by simply starting debugging like you would with any other language inside Visual Studio. Pressing F5 or the Start Debugging button will allow you to execute and debug your script.

To create a PowerShell Project, just navigate to File->New->Project and select one of the PowerShell project types.

Run a script from any project type

Scripts can also be run from any type of project using the context menu items or shortcut commands. Right clicking in a PowerShell script will show the option to run the script or the selection.

You can also run a script from the solution explorer. Just right click on the script and select Execute as Script.