GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to run a Python module in a subprocess when `subProcess: true` · Issue #1997 · microsoft/debugpy

Unable to run a Python module in a subprocess when subProcess: true #1997

New issue
Copy link
New issue
Copy link
Open
#1998
Open
Unable to run a Python module in a subprocess when subProcess: true#1997
#1998
Copy link
Assignees
rchiodocopilot-swe-agent
Labels
Fixed in next releaseThis issue has been fixed, but won't be available to customers until the next release.bugSomething isn't working

Description

@anvilpete
Pete (anvilpete)
opened on Feb 23, 2026
Issue body actions

The following script executes a Python module in a subprocess.

# main.py
import subprocess
import sys

subprocess.run([sys.executable, "-m", "sub"])
# sub.py
print("Hello, world!")
// launch.json
{
    "version": "0.2.0",
    "configurations": [
    
        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "subProcess": true,
        }
    ]
}

Running this in the debugger with "subProcess": true fails:

bash-3.2$  cd /Users/pete/projects/subprocess_test ; /usr/bin/env /Users/pete/projects/subprocess_test/.venv/bin/python /Users/pete/.vscode/extensions/ms-python.debugpy-2025.18.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher 56894 -- /Users/pete/projects/subprocess_test/main.py 
No module named sub

Running it with "subProcess": false works as expected:

bash-3.2$  cd /Users/pete/projects/subprocess_test ; /usr/bin/env /Users/pete/projects/subprocess_test/.venv/bin/python /Users/pete/.vscode/extensions/ms-python.debugpy-2025.18.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher 57618 -- /Users/pete/projects/subprocess_test/main.py 
Hello, world!

OS: Darwin arm64 25.3.0
VSCode: 1.109.5 (Universal)
Python Debugger: 2025.18.0
Python: 3.14.2 (in a virtualenv)

Reacted by James Wu
Reacted by Copilot and James Wu

Activity

  1. Rich Chiodo (rchiodo)
    transferred this issue frommicrosoft/vscode-python-debuggeron Feb 23, 2026
  2. Rich Chiodo (rchiodo)
    added
    bugSomething isn't working
    on Feb 23, 2026
  3. Rich Chiodo (rchiodo)
    assigned
    Rich Chiodo (rchiodo)
    and
    Copilot
    on Feb 23, 2026
  4. Rich Chiodo (rchiodo)
    closed this as completedin #1998on Feb 23, 2026
  5. rchiodo commented on Feb 23, 2026

    @rchiodo
    Rich Chiodo (rchiodo)
    on Feb 23, 2026
    Contributor
    More actions

    Reopening until we actually ship the fix. This seems to have been caused by changes in 3.14.

    Reacted by James Wu and Ahmad Bilal Khalid
  6. Rich Chiodo (rchiodo)
    reopened this on Feb 23, 2026
  7. Rich Chiodo (rchiodo)
    added
    Fixed in next releaseThis issue has been fixed, but won't be available to customers until the next release.
    on Feb 23, 2026
  8. anvilpete commented on Feb 23, 2026

    @anvilpete
    Pete (anvilpete)
    on Feb 23, 2026
    Author
    More actions

    Amazing, many thanks Rich!

  9. falkben commented on Apr 21, 2026

    @falkben
    Ben Falk (falkben)
    on Apr 21, 2026
    More actions

    For what it's worth, I get the error "No module named sub" even when I set "subProcess": false,

    This is on python 3.14.4 and using conda, though.

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

Metadata

Metadata

Assignees

  • Copilot
  • @rchiodo
    Rich Chiodo (rchiodo)

Labels

Fixed in next releaseThis issue has been fixed, but won't be available to customers until the next release.bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.