最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio - VS2022 Specify multiple debuglaunch configurations - Stack Overflow

programmeradmin0浏览0评论

I'm using VS2022 v17.11 and I have a native cpp project. The project have multiple build configurations, like Debug, Release, Profile, ASAN.

For each of those build types I need to be able to easily launch/debug from within the IDE using different sets of {working directory, command arguments} configurations. Currently to do this I need to open project settings go to "Debugging" section, and manually change the {workdir, args} fields EVERYTIME I need to launch with different arguments. As the project progresses, I have more and more different configurations to debug the application for different inputs/environments.

Is there a way to specify multiple debug configurations and to be able to select from some dropdown right before debug?

I've searched a lot, and found different suggestions that seems to be completly misleading and none of them work. That includes:

  • "Multi-project Launch configurations" - There is not way to specify different arguments
  • "launch.vs.json" - Visual studio doesn't recognize the existence of the file in the solution directory, this the closes that looks like what I need, but I can't get it to work.
  • "launchSettings.json" - same as above, and it seems to be only for C#, but couldn't find confirmation.
  • "Launch profiles UI" - I do not know why people are suggesting this all over the place, where it seems to only be for C#.
发布评论

评论列表(0)

  1. 暂无评论