启动 VS2019 并启动探查器或跳过欢迎屏幕

Starting VS2019 and either starting profiler or skipping welcome screen

我经常使用 VS 2019 (16.8.5) 在 Windows (10) 上分析使用 Qt 开发的应用程序。我已经在 Qt Creator 中将其配置为外部工具。

但是,每次我通过 运行ning devenv.exe 打开它时,我都必须经历相同的过程,即在启动欢迎屏幕上单击“无代码继续”,然后选择调试 → 性能分析器 从菜单。我想尽可能自动化。

所以我的问题是:有什么方法可以从命令行启动 IDE,跳过欢迎屏幕,直接进入探查器吗?如果没有,我可以至少跳过欢迎屏幕吗?

我查看了 the manual but couldn't find anything that seemed to do the job (/NoSplash doesn't skip the welcome screen, btw). However, I noticed that the output of devenv.exe /? in the console listed a slightly different option set, and also there's the /Command switch (which I also read the docs for), and both of these together, combined with past experience, lower my confidence in the completeness of the documentation there. I also found ,但它讨论了直接使用命令行分析器;不过,我想 运行 IDE 中的图形分析器。

如果无法通过 devenv.exe,是否有其他方法可以自动执行此操作?如果有 一种方法,那么额外的问题是:除了打开探查器之外,我还能走得更远,并在给定可执行文件名或 运行ning PID 的情况下实际开始进行探查吗?

通过各种设置,可以很容易地配置 Visual Studio 您喜欢的代码。几乎 VS Code 的编辑器、用户界面和功能行为的每个部分都有您可以修改的选项。

为了停止欢迎屏幕,请执行以下操作

  1. go to File > Preferences > Settings
  2. search "Startup Editor"
  3. choose "None" from the drop-down menu

为了在应用程序启动时编辑/制作新屏幕,请按照以下步骤操作

  1. go to File > Preferences > Settings
  2. search "Startup Editor"
  3. choose "NewUntitleFile" from the drop-down menu
  4. Setup your own file

您可以像这样启动 VS 并打开探查器:

"C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\devenv.exe" /Command Debug.DiagnosticsHub.Launch