Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Source lookup fails for paths with “.zip_\” segment

オープン
#1,964 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

bug

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:

  1. Create the following directory structure:
    C:\repro\archive.zip_\files\app\

  2. 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
}
]
}

  1. Start the Listen 9092 configuration in VS Code.
  2. In a separate console, run: python C:\repro\archive.zip_\files\app\script.py
  3. BOOM
主要言語
Python
スター
2.5k
フォーク
202
平均マージ
1日 20時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/debugpy のほかの issue

microsoft/debugpy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。