Source lookup fails for paths with “.zip_\” segment
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, vscode
調査の方向性
C:\repro\archive.zip_\files\app\script.py と .vscode/launch.json の設定を使用し、debugpy.connect() と debugpy.breakpoint() を使って失敗を再現します。まず、Windows 上の .zip_ セグメントに対するソース検索とパスマッピング処理を追跡します。VS Code でリテラルなパスが開き、ブレークポイントがバインドされ、ステップ実行がトップレベルの exec フレームにフォールバックしなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
- debugpy version: 1.8.15
- OS and version: XXX: Microsoft Windows 11 Enterprise , 10.0.22631 N/A Build 22631
- Python version : Python 3.8.9
- Using VS Code or Visual Studio: VS Code
Actual behavior
When attaching from VS Code (debugger in listen mode) to a target process that calls debugpy.connect(...), if the script’s path contains a directory segment like ...\archive.zip_\files... (this is a normal folder, not an archive), VS Code shows:
Unable to retrieve source for C:\repro\archive.zip_\files\app\script.py
Note the path is displayed as zip_\files, whereas the actual on-disk path is zip_\files. Because of this mismatch, the source cannot be opened, breakpoints remain unresolved, and stepping falls back to a top-level exec frame.
Renaming the folder so it does not contain .zip_ makes the problem disappear.
Expected behavior
The debugger should treat the file system path literally and open the source without rewriting segments around .zip. Breakpoints should bind and stepping should work normally for any valid Windows path.
Steps to reproduce:
-
Create the following directory structure:
C:\repro\archive.zip_\files\app\ -
Create C:\repro\archive.zip_\files\app\script.py with:
import debugpy
debugpy.connect(("127.0.0.1", 9092))
debugpy.breakpoint()
print(file)
In VS Code, open C:\repro\archive.zip_\files\app\ as the workspace and add .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen 9092",
"type": "python",
"request": "attach",
"listen": { "host": "127.0.0.1", "port": 9092 },
"pathMappings": [
{
"remoteRoot": "C:\repro\archive.zip_\files\app",
"localRoot": "C:\repro\archive.zip_\files\app"
}
],
"justMyCode": true
}
]
}
- Start the Listen 9092 configuration in VS Code.
- In a separate console, run: python C:\repro\archive.zip_\files\app\script.py
- BOOM
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 202
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 3
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
adr
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
メンテナーはふだん 1 日以内に返信
-
namespace operations
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
EclipseFdn/open-vsx.org#13665 ·
メンテナーはふだん 1 日以内に返信
-
doc good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
collective/icalendar#1865 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
canonical/opentelemetry-collector-operator#409 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
mozilla/addons-release-tests#1243 ·
メンテナーはふだん 1 日以内に返信