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分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 · 担当者 1 名 ·
-
triage-needed
microsoft/vscode-python-debugger#1104 · リアクション 1 件 · 担当者 1 名 ·
-
triage-needed
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
microsoft/vscode-python-debugger#1095 · コメント 1 件 · リアクション 1 件 ·
microsoft/vscode-python-debugger の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100