Debugger times out if shell startup is "slow"
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python, vscode
调研方向
通过向 ~/.zshrc 或 ~/.bashrc 添加一段较长的 sleep,然后从 VS Code 启动 debugpy 会话来复现超时。跟踪终端启动和调试命令移交过程;当调试器等待 shell 准备就绪并成功启动,而不是丢弃该命令时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Environment data
- debugpy version: v2024.6.0
- OS and version: macos 14.4.1
- Python version (& distribution if applicable, e.g. Anaconda): 3.10 CPython
- Using VS Code or Visual Studio: VS Code
Actual behavior
Debugger never starts and shows "timeout" error window.
In the terminal output you can see that the debugger command has been "pasted"/send to the terminal but the terminal was not ready yet. Hence, the command is discarded.
Its very similar to the issue described here: https://github.com/microsoft/vscode-js-debug/issues/1642
Expected behavior
Debugger waits for terminal to finish and then sends the command to the terminal.
Steps to reproduce:
- add a slow command to shell startup, e.g. "sleep 120" to ~/.zshrc or ~/.bashrc
- start any debug session with debugpy
- debugger will timeout
Background:
I have a zshrc setup that includes some startup scripts which usually take ~0.5-3 seconds. I've never found a satisfying workaround for this and many of the suggested solutions in the Issues in this repo never worked for me.
Current Workaround:
Currently, I am using a setting which works well enough for me
Here is the link to the vscode docs: https://code.visualstudio.com/docs/terminal/profiles#_configuring-the-taskdebug-profile
and here is the setting for me:
{
"terminal.integrated.automationProfile.osx": {
"path": "bash",
},
}
However, I wish this extension/debugger would support the same solution as https://github.com/microsoft/vscode-js-debug/issues/1642.
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 202
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·