Vscode-cmake-tools: Launching Debug from the status bar doesn't pick up settings from Launch.json

Created on 26 Apr 2020  路  3Comments  路  Source: microsoft/vscode-cmake-tools

If I run a debug session from the Run pane on the left my "args":[] settings in Launch.json but if I launch the debug from the status bar "Debug" they are not. Does this discrepancy make any sense?
In that regard I have read the discussion: https://github.com/microsoft/vscode-cmake-tools/pull/1200

debulaunch question

Most helpful comment

We do not have the resources to address this now but in future yes, that would be nice.

All 3 comments

The debug started from the Run pane on the left is the same as the one started via F5 and is not the CMake Tools one. Those two require launch.json. The CMake Tools debug from the status bar creates a small launch.json on the fly to send to the VSCode debugging framework. That small launch.json simply doesn't implement any args passing and also is not reading anything from the launch.json that exists in the .vscode folder.
If you already knew this and you are asking something else let me know.

Thank you for clarifying that. Is there a reason not to implement an uniform launch.json support?
Also do you think that the behavior would be unified at some point e.g. the extension will use the same shortcuts and buttons as VS?
I personally would like the have the same uniform experience across Visual Studio 2019 and VSCode+CPP Tools+CMake Tools. So that I can transition easily between VS2019 on Windows and VSCode on other platforms without much tinkering. Yet there are number of discrepancies like that one and even in Launch.json vs Launch.vs.json like `"args"["--someption: myoption"] is treated as a single token passed to main(argc,argv) in VSCode and as two separate in VS2019.

We do not have the resources to address this now but in future yes, that would be nice.

Was this page helpful?
0 / 5 - 0 ratings