microsoft / microsoft/vscode-cpptools
Running gdbserver as a `preLaunchTask` - need to press start/stop button several times
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
- VSCode Version: Code 1.14.0 (b8cd5b9556d8b70ea560d35b903422363f6c5c40, 2017-07-10T20:36:40.018Z)
- OS Version: Linux x64 4.4.0-53-generic
- Extensions:
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-docker | Pet | 0.0.16 |
| tslint | eg2 | 0.16.0 |
| language-haskell | jus | 2.3.1 |
| cpptools | ms- | 0.12.1 |
| debugger-for-chrome | msj | 3.1.6 |
| cmake | twx | 0.0.17 |
| cmake-tools | vec | 0.10.2 |
| debug | web | 0.20.0 |
| c-cpp-snippets | wlh | 0.1.0 |
Hello. Thank you for the great tool - I'm using vscode/cpptools everyday and happy with it.
Now to the problem. I have the following task in tasks.json:
{
"taskName": "docker build&run",
"linux": {
"args": [
"\"docker run --rm --privileged -p 2222:2222 -v ~/path/:/path/ -w /path/build cpp_tools bash -c 'cmake --build . && gdbserver localhost:2222 ./app'\""
]
},
"group": {
"kind": "build",
"isDefault": true
}
}
As you can see, it starts a docker container that builds an executable and runs gdbserver inside.
Here's my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) remote",
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "docker build&run",
"program": "${workspaceRoot}/build/app",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/build",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerServerAddress": "localhost:2222",
"sourceFileMap": {
"/path/": "~/path/"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
I want to build an app and start the debug session with F5 button. The problem is that I need to press F5 twice - the first press builds an app and starts the debug server in docker container and the second press launches my application (which successfully connects). The problem appears both for F5 and Start Debugging button in GUI.
Also I have to press stop button 3 (three) times in order to stop an application (both for Shift+F5 and the Stop button in GUI).
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
Riproduci il comportamento utilizzando le configurazioni tasks.json e launch.json, premendo F5 e quindi arrestando la sessione come descritto. Inizia tracciando il ciclo di vita di preLaunchTask e della sessione di debug nell’estensione; il lavoro è completato quando una pressione di F5 avvia l’attività e il debugger e un’azione di arresto termina l’applicazione e il server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, docker
- Ambito
- developer-experience, devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100