Skip to content

Debugger: It does not work with a virtual environment for Python. #31383

Closed
@stalexsm

Description

@stalexsm

Summary

On Zed Preview 0.188.2

.zed/debug.json:

[
{
"adapter": "Debugpy",
"label": "Bebugger",
"request": "launch",
"subProcess": true,
"redirectOutput": true,
"program": "main.py",
"args": [],
"stopOnEntry": false,
"cwd": "$ZED_WORKTREE_ROOT/boriy",
"python": "$ZED_WORKTREE_ROOT/boriy/.venv/bin/python"
}
]
The debugger starts, but when you try to make a request to the application to check the contents of the variables, the debugger shuts down and stops with an error.

Error:
2025-05-25 16:43:36 +0300] [5062] [INFO] Starting gunicorn 23.0.0
[2025-05-25 16:43:36 +0300] [5062] [INFO] Listening at: http://0.0.0.0:5555 (5062)
[2025-05-25 16:43:36 +0300] [5062] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2025-05-25 16:43:36 +0300] [5065] [INFO] Booting worker with pid: 5065
[2025-05-25 16:43:36 +0300] [5065] [INFO] Started server process [5065]
[2025-05-25 16:43:36 +0300] [5065] [INFO] Waiting for application startup.
[2025-05-25 16:43:36 +0300] [5065] [INFO] Application startup complete.
objc[5065]: +[NSMutableString initialize] may have been in progress in another thread when fork() was called.
objc[5065]: +[NSMutableString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[2025-05-25 16:43:44 +0300] [5062] [ERROR] Worker (pid:5065) was sent SIGABRT!

P.S.
A FastAPI Python application with a virtual environment!

Image Image

Zed Version and System Specs

Zed: v0.188.2 (Zed Preview)
OS: macOS 15.5.0
Memory: 8 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions