Add configuration option to issue a SIGTERM when the Stop button is clicked in debugger
@karthiknadig がすでに取り組んでいます。
2024年8月8日 から。
評価
この issue はまだ評価されていません。
説明
I want the ability to use the "Stop" button in the Python debugger in VS Code to send a SIGTERM (and/or maybe a SIGINT) to the running process, instead of just sending it SIGKILL (as it currently does).
This is the "Stop" button I'm talking about:
Proposed Solution
I'm thinking that a new option like this in the launch.json config file could be a good way to introduce this change without being a breaking change for the way everyone is used to the "stop" button working.
{
"configurations": [
{
"name": "Python Debugger: Current File (Integrated Terminal)",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stop_action": "SIGKILL", // this would be a new enum-like config option, with values of "SIGKILL", "SIGINT", "SIGTERM", maybe others
},
]
}
Possible additional ideas, more context
-
The minimum viable solution is described above.
-
SIGKILL (the current behavior) and SIGTERM are the two behaviors I'm personally chasing. SIGINT is another one that would be good to have as an option though.
-
As an extended implementation, the
stop_actionfield could support a process like: send SIGTERM, wait 15 seconds, send SIGKILL. -
This feature request stems from wanting to be able to test and debug the AWS Batch end-of-job behavior:
Under the hood, the Amazon ECS StopTask API call is used, which sends a
SIGTERMvalue to the running container task. If after 30 seconds the container is still running, aSIGKILLsignal is sent to forcibly stop the container. If the container handles theSIGTERMvalue gracefully and exits within 30 seconds from receiving it, noSIGKILLvalue is sent.
Related Previous Issues and Discussions
- microsoft/vscode-python#21605
- https://github.com/microsoft/debugpy/issues/500
- https://github.com/microsoft/vscode-python/discussions/21582
- 主要言語
- TypeScript
- スター
- 181
- フォーク
- 126
- 平均マージ
- 8時間 49分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-python-debugger のほかの issue
-
triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/vscode-python-debugger#1110 ·
-
triage-needed
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/vscode-python-debugger#1024 · コメント 1 件 ·
-
triage-needed
microsoft/vscode-python-debugger#1111 · リアクション 1 件 · 担当者 1 名 ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · リアクション 1 件 · 担当者 1 名 ·
-
triage-needed
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
microsoft/vscode-python-debugger#1095 · コメント 1 件 · リアクション 1 件 ·
microsoft/vscode-python-debugger の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100