microsoft / microsoft/vscode-cpptools
Can't pause after press run with no breakpoint when debug with cpptool(but can stop at the begining)
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
- Last question updated: 2020/4/14/14:51
- Enviroment:
- Win10 (x64),
- last version of vscode(2020/4/14),
- Extension version: 0.27.0
Source Code (main.c):
#include <stdio.h>
int main(void)
{
int cnt_1st = 0;
int cnt_2nd = 0;
while (1)
{
// sched_run_idle();
if (cnt_1st > 40000000)
{
cnt_1st = 0;
cnt_2nd++;
if (cnt_2nd > 100)
{
cnt_2nd = 0;
printf("heart beat\n");
}
}
cnt_1st++;
}
return 0;
}
Bug Description:
step1: Before pressing F5 I create a breakpoint in the line of " if (cnt_1st > 40000000)",
step2: then press F5 then we can hit the breakpoint normally,
step3: we can do all debug operations such as watch the value of parameter,and changed them by hand.


step4: once I cancel all breakpoints and press "run" , the debug progress will can't stop anymore,
step5: even I create breakpoint again in any where of the codes, result is the same.

and I found there are 3 threads in the left side of the vscode windows,
all states are RUNING, when click stop in any thread , the thread is still running.
in the console side the heartbeat is keep printing.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "c/c++",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:/MinGW/bin/gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
task.json:
{
"version": "2.0.0",
"command": "build",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "gcc",
"args": [
"main.c",
"-g"
]
}
]
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
main.c、launch.json、task.jsonを使用して動作を再現します。ブレークポイントから開始し、F5を押して、ブレークポイントをキャンセルした後、RunとStopを使用します。プロセスとそのスレッドが実行されたままになるか、また新しく追加したブレークポイントが機能するかを確認します。最初のブレークポイントを削除した後に、Pause、Stop、および後から追加したブレークポイントが正常に動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, typescript, vscode
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100
