microsoft / microsoft/vscode-azurefunctions

Hot Reload not working when debugging with F5 (Python)

Open
#3,936 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

investigate
Dominant language
TypeScript
Stars
319
Forks
158
Avg merge
2d 13h
Merged PRs (30d)
4

Description

I'm developing an Azure Durable Functions application using VS Code and the Python V2 model. I use the default debug configuration to run the application (I press F5).

When changing code while the application is running, the application exits. You can see that in the screenshot below.

image

  • Just before the red ❌ the application has started and accepts requests.
  • At the ❌ I change a line of code in function_app.py and the application exits.

However, when I decide to manually run application with func host start --language-worker -- "-m debugpy --listen 127.0.0.1:9091" then any code changes simply reload the application. This saves about a minute of time compared to launching via F5 again.

I believe that the behaviour was different about half a year ago where it was also hot reloading when the application was launched via F5. Could this be looked at, please?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the default VS Code F5 debug configuration with the manual func host start --language-worker -- "-m debugpy --listen 127.0.0.1:9091" entry point. Reproduce the exit after editing function_app.py, then trace how the extension launches the Python V2 Azure Functions host. Done means code changes reload under F5 without exiting the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python, typescript, vscode
Domain
cloud, developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.