microsoft / microsoft/vscode-cpptools
My debugger isn't hitting any breakpoints, and my file is being compiled with the -g flag.
Open
@sean-mcmanus is already working on this.
Since Feb 10, 2022.
debugger
more info needed
tasks/build/debug
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
My debugger isn't hitting any breakpoints, and my file is being compiled with the -g flag.
tasks.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe arquivo de build ativo",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$g++"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Tarefa gerada pelo Depurador."
}
],
"version": "2.0.0"
}
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Criar e depurar o arquivo ativo",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "C:/MinGW/bin",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Habilitar a reformatação automática para gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Definir Tipo de Desmontagem como Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe arquivo de build ativo"
}
]
}
The build is finished successfully, and then this is executed in the integrated terminal:

but I can't type anything.
I would really appreciate any help on this, It's so frustrating being unable to properly debug my C++ programs...
Originally posted by @gabrielbergoc in https://github.com/microsoft/vscode-cpptools/issues/6128#issuecomment-1033807992
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.
Assessment
This issue has not been assessed yet.