microsoft / microsoft/vscode-cpptools

Don't immediately close the external console window when the program ends

オープン
#5,899 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

debugger
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

Type: Debugger

Describe the bug

  • OS and Version: Windows 10
  • VS Code Version: 1.47.3
  • C/C++ Extension Version: 0.29.0
  • Other extensions you installed (and if the issue persists after disabling them): none

When debugging and running C/C++ code on an external console ("externalConsole": true in launch.json), the console window is immediately closed at the end of the program.

This is inconvenient, as there can be some output we are interested in and that we are unable to read as the console window is immediately closed.

There are workarounds to that, like putting a breakpoint in the last return 0; line of main(), or adding cin.ignore(); cin.get(); lines, or getch(), or system("PAUSE");, or something similar.
But these are not optimal solutions.

The best experience would be to just have the external console to prompt the user to press a key before it gets closed (like the debugger would automatically invoke a system("PAUSE") before closing the external console).

This behavior could be made customizable with something like "externalConsolePauseAtExit": true/false in launch.json.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、externalConsole の launch.json 処理と、Windows デバッガープロセスの終了経路を特定します。externalConsole を有効にした最小限の C/C++ プログラムを実行し、提案された構成オプションによって動作が制御された状態で、外部ウィンドウを閉じる前に一時停止できることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, typescript
領域
devtools, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。