microsoft / microsoft/vscode-cpptools
Difficulties configuring debugger as a first-time user
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Brief Issue Summary
I found it difficult to work out how to enable C++ debugging when I first started using VS Code a couple of weeks ago.
On both macOS and Windows my experience was as follows:
- installed VS code
- installed recommended C/C++ extensions (C/C++, CMake, CMake Tools, C/C++ themes)
- loaded a folder containing a CMakeLists.txt file
- built the project
Then I choose the Run & Debug option in the UI, and could see it wasn't configured. Fair enough, so I clicked on the option to Create a launch.json file.
This popped up a menu in the command palette offering only "Node.js" and two entries for "Web App", but nothing related to C/C++.
I couldn't for the life of me see how to configure a C/C++ debugger on either platform, despite reading a lot of documentation.
In the end I stumbled upon it; I choose to create a launch json for Node.js (even though this isn't what I wanted for C/C++).
Now that I had a launch.json created, I noticed a blue button bottom right, "Add Config".
When I clicked this button, I finally got the options to configure a C/C++ debugger (different ones according to whether I was trying this on macOS and Windows).
I then just needed to delete the entry in launch.json for Node.js to leave things correctly configured.
My feedback is that I very nearly gave up on this software due to the above and that the extensions I installed should have allowed me to directly create the correct json file.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported workflow on macOS and Windows: install the C/C++ and CMake extensions, open a folder with CMakeLists.txt, build it, and use Run & Debug to create launch.json. Compare the initial Create a launch.json options with the later Add Config options; done means a first-time C++ user can directly configure the appropriate debugger without creating and deleting a Node.js entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100