Python plugin fails with debugpy 1.8.16 - timeout during adapter connection
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
The reported failure points to the Python plugin’s start.py, where debugpy.listen() is called, and compares debugpy 1.8.16 with 1.8.15. Read that call and check the plugin’s debugpy dependency requirements, then reproduce with both versions using the listed Gauge command. Done means debugging connects successfully with debugpy 1.8.16 or the supported version constraint is clear.
由索引模型根据 Issue 内容生成。
描述
Python plugin fails with debugpy 1.8.16 - timeout during adapter connection
Environment
- Gauge version: 1.6.21 (Commit Hash: 7d3f2cf)
- Gauge plugins: html-report (4.3.3), json-report (0.5.2), python (0.4.11), screenshot (0.3.2)
- VS Code Gauge extension: v0.2.3
- debugpy version: 1.8.16 (broken), 1.8.15 (works)
- Python version: 3.12.11
- OS: Windows
Description
When running Gauge specs with debugpy 1.8.16, the Python plugin consistently fails with a timeout error during debugpy adapter connection. The plugin's start.py calls debugpy.listen() but the adapter connection times out. Downgrading to debugpy 1.8.15 resolves the issue completely.
This appears to be a compatibility issue between Gauge Python plugin and the latest debugpy version.
Steps to Reproduce
- Install debugpy 1.8.16:
pip install debugpy==1.8.16 - Configure Gauge Python plugin with debugging enabled
- Run any Gauge spec:
gauge run --hide-suggestion --simple-console <spec_file> - Observer timeout error
Expected Behavior
The debugger should connect successfully and allow debugging of test execution, as it does in version 1.8.15.
Actual Behavior
Traceback (most recent call last):
File "<venv>\Lib\site-packages\debugpy\server\api.py", line 235, in listen
sock, _ = endpoints_listener.accept()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<python>\Lib\socket.py", line 295, in accept
fd, addr = self._accept()
^^^^^^^^^^^^^^
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\...\AppData\Roaming\gauge\plugins\python\0.4.11\start.py", line 72, in <module>
main()
File "C:\Users\...\AppData\Roaming\gauge\plugins\python\0.4.11\start.py", line 29, in main
start()
File "C:\Users\...\AppData\Roaming\gauge\plugins\python\0.4.11\start.py", line 52, in start
debugpy.listen(('127.0.0.1', int(debug_port)))
File "<venv>\Lib\site-packages\debugpy\public_api.py", line 47, in wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv>\Lib\site-packages\debugpy\server\api.py", line 133, in debug
log.reraise_exception("{0}() failed:", func.__name__, level="info")
File "<venv>\Lib\site-packages\debugpy\server\api.py", line 131, in debug
return func(address, settrace_kwargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv>\Lib\site-packages\debugpy\server\api.py", line 249, in listen
raise RuntimeError("timed out waiting for adapter to connect")
RuntimeError: timed out waiting for adapter to connect
Workaround
Downgrade to debugpy 1.8.15:
pip install debugpy==1.8.15
Additional Context
The issue is in the Gauge Python plugin's start.py (line 52) which calls debugpy.listen(('127.0.0.1', int(debug_port))). Something changed in debugpy 1.8.16 that breaks the adapter connection flow.
The timeout occurs even with extended timeout values configured in Gauge Python properties. This suggests the issue is not just timing but a breaking change in debugpy's API or connection handling.
Suggested Fix
- Pin debugpy version to <=1.8.15 in plugin requirements, or
- Update plugin's debugpy integration to work with 1.8.16+, or
- Investigate if debugpy's
listen()API changed and needs different parameters/setup
- 主要语言
- Python
- 星标
- 96
- 派生
- 38
- 平均合并
- 1 小时 18 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getgauge/gauge-python 的其他 Issue
-
GAUGE_PYTHON_COMMAND does not support relative paths (e.g. .venv/bin/python)可能已有人在做 @JakubStyczen 于 40 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
getgauge/gauge-python#485 ·
-
help wanted
难度 3/5 1-2 天 新手友好度 35/100
getgauge/gauge-python#324 · 4 条评论 ·
-
help wanted
难度 3/5 1-2 天 新手友好度 35/100
getgauge/gauge-python#265 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
getgauge/gauge-python#245 ·
-
help wanted triage
难度 1/5 1 小时以内 新手友好度 35/100
getgauge/gauge-python#123 · 1 条评论 ·
查看 getgauge/gauge-python 的全部 Issue
相似的 Issue
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-free可能已有人在做 @Aaqibhafeezkhan 今天认领。 未关闭beginner documentation good first issue
难度 2/5 1-3 小时 新手友好度 75/100
BistaDinesh03/critique#164 · 1 条评论 ·
维护者通常 1 天内回复
-
bug IO
难度 2/5 1-3 小时 新手友好度 65/100
MrNeRF/LichtFeld-Studio#3824 ·
维护者通常 1 天内回复
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 72/100
open-webui/open-webui#33200 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog check可能已有人在做 @ocelotl 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
open-telemetry/opentelemetry-python#5825 ·
维护者通常 2 天内回复