microsoft / microsoft/vscode-cpptools
Cannot debug wxWidgets in VSC in Mac
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Type: Debugger
Describe the bug
- OS and Version: 10.15.4
- VS Code Version: 1.44.2
- C/C++ Extension Version: 0.27.0
- A clear and concise description of what the bug is.
I have a project that uses wxWidgets and if I buil it using cmake and make the resulting objects works as expected when called from the terminal.
Nevertheless, if I debug it from VCS I get:
As can be seen the headers from wxWidget are not detected as well:

It basically says that cannot open those header files.
My CMakeFile.txt include the directory to wx where all the header files are located:
cmake_minimum_required(VERSION 3.11.3)
set(CMAKE_CXX_STANDARD 17)
project(Membot)
find_package(wxWidgets REQUIRED COMPONENTS core base)
include(${wxWidgets_USE_FILE})
file(GLOB project_SRCS src/*.cpp)
add_executable(membot ${project_SRCS})
target_link_libraries(membot ${wxWidgets_LIBRARIES})
target_include_directories(membot PRIVATE "/usr/local/opt/wxmac/include/wx-3.0")
So I do not understand where the error is.
My launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "clang++ - Compilar y depurar el archivo activo",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/membot",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb"
//"preLaunchTask": "clang++ build active file"
}
]
}
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da launch.json e CMakeFile.txt, confrontando la configurazione del debugger di VS Code con l'eseguibile compilato nel terminale e i relativi percorsi di inclusione di wxWidgets. Riproduci l'avvio usando le versioni indicate di macOS, VS Code e dell'estensione C/C++. Il lavoro è completato quando il debugger apre gli header di wxWidgets ed esegue come previsto l'eseguibile membot compilato con CMake.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cmake, cpp, vscode
- Ambito
- build-system, devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100