Skip to content

Debugger doesn't connect with venv #784

Closed as not planned
Closed as not planned

Description

@smosek

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
System Info
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

Activity

  1. eleanorjboyd commented on Aug 22, 2025

    @eleanorjboyd
    Member

    Hi! Can you try adding python.useEnviornmentsExtension: false to your user settings and let me know if you see a change? Thanks

  2. smosek commented on Aug 23, 2025

    @smosek
    Author

    Eleanor Boyd (@eleanorjboyd) That didn't make any difference

  3. jonathanmach commented on Sep 5, 2025

    @jonathanmach

    I've been facing the same issue for a couple of weeks now :/

  4. aksharpatel47 commented on Sep 10, 2025

    @aksharpatel47

    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.

  5. eleanorjboyd commented on Sep 12, 2025

    @eleanorjboyd
    Member

    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.

  6. arthurspa commented on Sep 18, 2025

    @arthurspa

    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.

  7. tomunger commented on Sep 30, 2025

    @tomunger

    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.

    unger@most ptdash %  /usr/bin/env /Users/unger/dev/src/ptdash/.venv/bin/python /Users/unger/.vscode/extensions/ms-python.debugpy-2025.13.2025091201-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher 6
    3695 -- /Users/unger/dev/src/ptdash/.venv/bin/streamlit run str_dtp.py 
    ^C%                                                                                                                                                                                                                   
    unger@most ptdash % source /Users/unger/dev/src/ptdash/.venv/bin/activate
    (ptdash) unger@most ptdash % 
    
    

    Running no-code debugging worked:

    debugpy /Users/unger/dev/src/ptdash/.venv/bin/streamlit run str_dtp.py

    This happens on all python programs I have, not a specific repository.

  8. vs-code-engineering commented on Oct 23, 2025

    @vs-code-engineering

    This issue has been closed as it has been labeled with info-needed and has not received the additional information that was requested from the issue author. It has been labeled as info-needed for 14 days.

  9. eleanorjboyd commented on Oct 28, 2025

    @eleanorjboyd
    Member

    seems like this might be an activation / terminal issue Anthony Kim (@anthonykim1)

  10. anthonykim1 commented on Oct 29, 2025

    @anthonykim1

    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.

  11. qiulang commented on Oct 31, 2025

    @qiulang

    Anthony Kim (@anthonykim1) How do I "using shell startup from python-envs.terminal.autoActivationType" ?

    I tied this but it does not work

    Image
  12. vs-code-engineering commented on Nov 6, 2025

    @vs-code-engineering

    smosek, this issue has been labeled with info-needed and has not received a response. Please provide the additional information that was requested, or this issue will be automatically closed in 7 days.

  13. vs-code-engineering commented on Nov 11, 2025

    @vs-code-engineering

    This issue has been closed as it has been labeled with info-needed and has not received the additional information that was requested from the issue author. It has been labeled as info-needed for 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions