microsoft / microsoft/vscode-cpptools
[Mac]breakpoints not working if there are spaces in file's path
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Bug type: Debugger
Describe the bug
- OS and Version: Mac 11.5
- VS Code Version: 1.58.2
- C/C++ Extension Version: 1.5.1
In mac, use clang++ to compile and lldb to debug. If there are some spaces in the cpp file's path, the breakpoint won't work when debugging.
To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:
Just use lldb debug a file whose path has some spaces.
Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.
the launch.json file:
{
"name": "(lldb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.out",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"internalConsoleOptions": "openOnSessionStart",
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "clang++ build"
}
tasks.json:
{
"type": "cppbuild",
"label": "clang++ build",
"command": "/usr/bin/clang++",
"args": [
"-std=c++14",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.out"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
},
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
Start with the supplied launch.json and tasks.json, reproducing the issue with clang++ and lldb on a C++ file whose path contains spaces. Done means the generated .out program debugs normally and breakpoints are reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100