Add configuration option to issue a SIGTERM when the Stop button is clicked in debugger
維護者通常 1 天內回覆
@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 分鐘
- 30 天內合併 PR
- 1
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-python-debugger 的其他 Issue
-
triage-needed
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/vscode-python-debugger#1110 ·
維護者通常 1 天內回覆
-
triage-needed
難度 1/5 1-3 小時 新手友好度 88/100
microsoft/vscode-python-debugger#1024 · 1 則留言 ·
維護者通常 1 天內回覆
-
Update dependencies with actionable security alerts可能已有人在做 @copilot-swe-agent 於 9 天前認領。 未關閉triage-needed
microsoft/vscode-python-debugger#1111 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Update vulnerable npm dependencies可能重新可做 關聯的 PR 已關閉且未合併。 未關閉triage-needed
microsoft/vscode-python-debugger#1104 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
triage-needed
難度 4/5 3-5 天 新手友好度 58/100
microsoft/vscode-python-debugger#1095 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
查看 microsoft/vscode-python-debugger 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
diegosouzapw/OmniRoute#14869 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 94/100
維護者通常 1 天內回覆
-
status: waiting triage
難度 2/5 1-3 小時 新手友好度 84/100
freeCodeCamp/freeCodeCamp#70412 ·
維護者通常 1 天內回覆
-
Mend: dependency security vulnerability untriaged
難度 1/5 1 小時以內 新手友好度 88/100
opensearch-project/OpenSearch-Dashboards#12816 ·
維護者通常 1 天內回覆