Repository navigation
Debugger doesn't connect with venv #784
Copy link
Copy link
Closed as not planned
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Type: Bug
- Create .venv virtual environment
- Set python interpreter to .venv/bin/python
- Run program
The terminal shows the activate command and the launch command, but only the activate command is run:
source /Users/smosek/purecloud/sandbox/kiro-test/.venv/bin/activate
/usr/bin/env /Users/smosek/purecloud/sandbox/kiro-test/.venv/bin/python /Users/smosek/.kiro/extensions/ms-python.debugpy-2025.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher 61147 -- /Users/smosek/purecloud/sandbox/kiro-test/test.py
kiro-test (dev|use1|admin) % source /Users/smosek/purecloud/sandbox/kiro-test/.venv/bin/activate
(.venv) kiro-test (dev|use1|admin) %
After a while I get a message saying: "Timed out waiting for launcher to connect".
Extension version: 2025.10.0
VS Code version: Code 1.103.1 (Universal) (360a4e4fd251bfce169a4ddf857c7d25d1ad40da, 2025-08-12T16:25:40.542Z)
OS version: Darwin arm64 24.6.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.13.5
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Unknown
Details
| Item | Value |
|---|---|
| CPUs | Apple M4 Pro (14 x 2400) |
| GPU Status | 2d_canvas: enabled direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: enabled_on trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 4, 7, 6 |
| Memory (System) | 48.00GB (0.07GB free) |
| Process Argv | --crash-reporter-id 8e3698ac-df8a-4a8e-8e4c-25ffcc015b57 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
747dc170:31275177
6518g693:31334701
aj953862:31281341
9d2cg352:31346308
convertlamdaf:31368658
nesew2to5:31336538
agentclaude:31350858
nes-set-on:31351930
63221493:31336333
0927b901:31350571
f76d9909:31348711
editstats-enabled:31346257
45650338:31358607
0cj2b977:31352657
0574c672:31362109
asdad:31365766
newchatstate:31363049
pylancealldocsf:31367565
cloudbuttont:31368504
retryenabled:31370050
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
eleanorjboyd commentedon Aug 22, 2025
Hi! Can you try adding
python.useEnviornmentsExtension: falseto your user settings and let me know if you see a change? Thankssmosek commentedon Aug 23, 2025
Eleanor Boyd (@eleanorjboyd) That didn't make any difference
jonathanmach commentedon Sep 5, 2025
I've been facing the same issue for a couple of weeks now :/
aksharpatel47 commentedon Sep 10, 2025
Facing the same issue. I tried Python 3.13, 3.12 and 3.11 in venv and they all ran into the same "Timed out waiting for launcher to connect" error.
eleanorjboyd commentedon Sep 12, 2025
hm this is very interesting as I have been using the debugger and haven't run into this issue. Is there anything special about your setup or a way you could provide a repro which I can try on my own machine? Could you try this "no config debugging" and see if you get different behavior there: https://github.com/microsoft/vscode-python-debugger/wiki/No%E2%80%90Config-Debugging. The connection process is a little different so that could provide some context.
arthurspa commentedon Sep 18, 2025
I have the same problem.
When I tested with "no config debugging" above the break point works.
I'm not sure if it's related, but it seems it started to happen after I upgraded to Mac OS 26 yesterday.
tomunger commentedon Sep 30, 2025
I have the same problem. It started about a month ago and has not resolved. What I see is that when a launch the debugger and there is no open debug terminal, the debug command gets interrupted. See the
^C. VS code continues to wait for the debugger and eventually times out. Second time I run the debugger, the debug command is not interrupted and debugging proceeds as normal. All good as long as I keep that debug terminal open.Running no-code debugging worked:
debugpy /Users/unger/dev/src/ptdash/.venv/bin/streamlit run str_dtp.pyThis happens on all python programs I have, not a specific repository.
vs-code-engineering commentedon Oct 23, 2025
This issue has been closed as it has been labeled with
info-neededand has not received the additional information that was requested from the issue author. It has been labeled asinfo-neededfor 14 days.eleanorjboyd commentedon Oct 28, 2025
seems like this might be an activation / terminal issue Anthony Kim (@anthonykim1)
anthonykim1 commentedon Oct 29, 2025
This is possible depending on how commands are being sent to the terminal, I'd recommend enabling python environment extension again, and using shell startup from
python-envs.terminal.autoActivationType.Or else try with latest VS Code-insiders, and pre-release of Python environment extension. It should be better.
I'd still recommend the first approach.
qiulang commentedon Oct 31, 2025
Anthony Kim (@anthonykim1) How do I "using shell startup from python-envs.terminal.autoActivationType" ?
I tied this but it does not work
vs-code-engineering commentedon Nov 6, 2025
smosek, this issue has been labeled with
info-neededand has not received a response. Please provide the additional information that was requested, or this issue will be automatically closed in 7 days.vs-code-engineering commentedon Nov 11, 2025
This issue has been closed as it has been labeled with
info-neededand has not received the additional information that was requested from the issue author. It has been labeled asinfo-neededfor 7 days.