Reputation: 51
I used to open a solution file in Visual Studio, right click a project, select "Debug" -> "Start a new instance" to start a debug session.
Can I write a powershell script to automate this? To make things easier, the automation does not have to rebuild and Project, the script only needs to start a debug session in Visual Studio executing myApplication.debug.exe
Upvotes: 5
Views: 2213
Reputation: 911
Visual Studio has a 'DebugExe' command-line parameter you can use to accomplish this.
param
(
[Parameter(Mandatory = $false)]
[String]
$TargetFileName
)
& "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /command "Debug.Start" /debugexe "$TargetFileName"
Upvotes: 1