Autoreload in VS Code Python Debugger Does Not Reflect Code Changes After Breakpoint
@eleanorjboyd 已經在處理了。
開始於 2025年10月16日。
評估
這個 Issue 還沒有評估資料。
描述
Description
I’m trying to use the autoreload feature described in here to enable a dynamic, interactive debugging experience.
Goal:
Allow users to modify code after hitting a breakpoint—before those lines have executed—and have those changes reflected in the debugger as if they were present from the start.
Based on the documentation, I believe autoreload should support this behavior.
Steps to Reproduce
- Enable autoreload in the VS Code Python debugger. This is my
launch.jsonin.vscode.
{
"version": "0.2.0",
"configurations": [
{
"name": "Moo: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"autoReload": {
"enable": true
}
}
]
}
- Start a debugging script in the VS Code editor debugger (via the Run and Debug panel), not the Debug Console with the following sequence:
if __name__=="__main__"
print('Moo') # Breakpoint here at the start
print('Baa') # Breakpoint here at the start
#print('Roar') # Uncomment these two lines when at the 'Baa' breakpoint, but before executing 'Baa'
#print('Woof') # Uncomment these two lines when at the 'Baa' breakpoint, but before executing 'Baa'
print('Quack') # Breakpoint here at the start
print('Meow') # Breakpoint here at the start
print('Done') # Breakpoint here at the start
Expected Behavior
The newly added lines should execute as if they were part of the original script when the debugger resumes.
Moo
Baa
Roar
Woof
Quack
Meow
Done
Actual Behavior
The output is
Moo
Baa
Quack
Meow
Done
The two added lines during debugging are ignored.
Environment
VS Code Version: 1.104.3
Python extension for VS Code: 2025.14.0
Python Debugger extension for VS Code:
2025.10.0
Python version: 3.12.10
OS: Windows_NT x64 10.0.26100
Question
Am I using autoreload incorrectly, or is this a bug in the debugger?
- 主要語言
- TypeScript
- 星號
- 181
- 分支
- 126
- 平均合併
- 8 小時 49 分鐘
- 30 天內合併 PR
- 1
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-python-debugger 的其他 Issue
-
triage-needed
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/vscode-python-debugger#1110 ·
-
triage-needed
難度 1/5 1-3 小時 新手友好度 88/100
microsoft/vscode-python-debugger#1024 · 1 則留言 ·
-
triage-needed
microsoft/vscode-python-debugger#1111 · 1 個 reaction · 已指派 1 人 ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · 1 個 reaction · 已指派 1 人 ·
-
triage-needed
難度 4/5 3-5 天 新手友好度 58/100
microsoft/vscode-python-debugger#1095 · 1 則留言 · 1 個 reaction ·
查看 microsoft/vscode-python-debugger 的全部 Issue
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 1/5 1 小時以內 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
難度 2/5 1-3 小時 新手友好度 70/100