Autoreload in VS Code Python Debugger Does Not Reflect Code Changes After Breakpoint
@eleanorjboyd đang làm issue này rồi.
Từ ngày 16/10/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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?
- Ngôn ngữ chính
- TypeScript
- Star
- 181
- Fork
- 126
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-python-debugger
-
triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/vscode-python-debugger#1110 ·
-
triage-needed
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/vscode-python-debugger#1024 · 1 bình luận ·
-
triage-needed
microsoft/vscode-python-debugger#1111 · 1 reaction · 1 người được giao ·
-
triage-needed
microsoft/vscode-python-debugger#1106 · 1 reaction · 2 người được giao ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · 1 reaction · 1 người được giao ·
Tất cả issue của microsoft/vscode-python-debugger
Issue tương tự
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenNSW/nsw-srilanka#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
digidem/comapeo-cloud-app#403 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100