Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

VS Code Debugger Freezes When Using wrap_wsgi_app with debugpy

Open
#1,908 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, vscode
Domain
devtools

Research direction

Start with the sample project’s main.py, especially lines 5, 6, and 8, and launch its included “wsgiref” debug configuration under Python 3.13. Reproduce the breakpoint freeze with curl, then trace the interaction between wrap_wsgi_app(app) and debugpy. Done means breakpoints focus the source line, debugger controls respond, and the HTTP request completes after resuming.

Written by the indexing model from the issue text.

Description

Environment data

  • debugpy version: XXX (run import debugpy; print(debugpy.__version__) if uncertain) 1.8.13
  • OS and version:
  • Python version (& distribution if applicable, e.g. Anaconda):
Virtualenv
Python:         3.13.4
Implementation: CPython
Platform:   linux
OS:         posix
Python:     3.13.4
Path:       /home/tony/.pyenv/versions/3.13.4
Executable: /home/tony/.pyenv/versions/3.13.4/bin/python3.13
  • Using VS Code

Actual behavior

  • VS Code debugger gets stuck once breakpoint is hit.
  • UI does not switch to source code line.
  • Debugger controls (Resume, Step Out, etc.) are unresponsive.
  • HTTP server hangs (no response).
  • However, the VS Code CALL STACK shows status: "PAUSED".

Expected behavior

  • Debugger pauses on the specified line and focuses editor on source code.
  • Debugger controls should remain fully functional.
  • Upon resuming, the HTTP server should respond correctly:
HTTP/1.0 200 OK
Content-Length: 13
Content-Type: text/plain
Date: Wed, 11 Jun 2025 20:54:32 GMT
Server: WSGIServer/0.2 CPython/3.13.4

Hello world!

Steps to reproduce:

  1. Clone the sample project: https://github.com/totobest/python-debug-test
  2. Setup Python interpreter and install venv (poetry configuration is included)
  3. Launch the included "wsgiref" debug configuration..
  4. Set a breakpoint on line 5 or 6 of main.py..
  5. In a terminal, run: curl -i localhost:8000

Additional Context

  • Issue occurs consistently across Python versions 3.9 to 3.13.
  • Tested across multiple Python Debugger extension versions (2024.x to latest).
  • Works as expected when no breakpoint is set.
  • Removing the call to wrap_wsgi_app(app) (line 8) resolves the issue entirely.
Dominant language
Python
Stars
2.5k
Forks
202
Avg merge
5d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

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.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.