gpt4 book ai didi

powershell - 使用 Powershell 脚本开始调试 Visual Studio 项目

转载 作者:行者123 更新时间:2023-12-03 23:52:33 28 4
gpt4 key购买 nike

我曾经在 Visual Studio 中打开一个解决方案文件,右键单击一个项目,选择“调试”->“启动新实例”以启动调试 session 。

我可以编写一个 powershell 脚本来自动执行此操作吗?为了使事情更容易,自动化不必重建和项目,脚本只需要在执行 myApplication.debug.exe 的 Visual Studio 中启动调试 session

最佳答案

Visual Studio 有一个“DebugExe”命令行参数,您可以使用它来完成此操作。

param
(
[Parameter(Mandatory = $false)]
[String]
$TargetFileName
)

& "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /command "Debug.Start" /debugexe "$TargetFileName"

关于powershell - 使用 Powershell 脚本开始调试 Visual Studio 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15211887/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com