Source lookup fails for paths with “.zip_\” segment
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python, vscode
- Ambito
- devtools, operating-systems
Direzione di ricerca
Riproduci il problema con C:\repro\archive.zip_\files\app\script.py e la configurazione .vscode/launch.json, usando debugpy.connect() e debugpy.breakpoint(). Inizia tracciando la ricerca del sorgente e la gestione della mappatura dei percorsi per il segmento .zip_ su Windows. Il lavoro è completato quando il percorso letterale si apre in VS Code, i breakpoint vengono associati e lo stepping non ricade più in un frame exec di livello superiore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 2.5k
- Fork
- 202
- Merge medio
- 5g 1h
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/debugpy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Document "rules"-option Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Tutte le issue di microsoft/debugpy
Issue simili
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Apertaarea: ci bug perceived difficulty: 3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-connect#1057 ·