microsoft / microsoft/vscode-cpptools
Running gdbserver as a `preLaunchTask` - need to press start/stop button several times
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
- 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).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
tasks.json と launch.json の構成を使用し、説明されているとおり F5 を押してからセッションを停止して、動作を再現します。まず、拡張機能内の preLaunchTask とデバッグセッションのライフサイクルを追跡します。F5 を 1 回押すとタスクとデバッガーが開始され、停止操作を 1 回行うとアプリケーションとサーバーが終了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, docker
- 領域
- developer-experience, devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100