You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for debugging uvx or pipx launched code #1894
Actually attach works already because uvx eventually starts a python process, and you can debug a python process. Mainly launch. But, if there are any papercuts with attach and this scenario we should address those as well.
And do they run from the command line or does VS code start them?
VS Code launches the code, because VS Code needs access to stdio to communicate with MCP in stdio mode. For SSE based MCP it is a bit different, but both are launched by VS Code.
VS Code launches the code, because VS Code needs access to stdio to communicate with MCP in stdio mode. For SSE based MCP it is a bit different, but both are launched by VS Code.
Doesn't this mean we can just change VS code to launch it using python -m debugpy and then pass whatever arguments uvx/pipx are passing to python?
Not for uvx or pipx, the environment where the python is for cases where the launch command is uvx run <my-server> is not pre-determined to use python -m debugpy. uvx will create the environment on the fly, which makes it hard to use python here.
Activity
rchiodo commentedon May 19, 2025
Does this mean attach or launch? Or maybe both? And do they run from the command line or does VS code start them?
karthiknadig commentedon May 19, 2025
Actually attach works already because
uvxeventually starts a python process, and you can debug a python process. Mainly launch. But, if there are any papercuts with attach and this scenario we should address those as well.VS Code launches the code, because VS Code needs access to stdio to communicate with MCP in stdio mode. For SSE based MCP it is a bit different, but both are launched by VS Code.
rchiodo commentedon May 19, 2025
Doesn't this mean we can just change VS code to launch it using python -m debugpy and then pass whatever arguments uvx/pipx are passing to python?
karthiknadig commentedon May 19, 2025
Not for
uvxorpipx, the environment where thepythonis for cases where the launch command isuvx run <my-server>is not pre-determined to usepython -m debugpy.uvxwill create the environment on the fly, which makes it hard to usepythonhere.rchiodo commentedon May 19, 2025
Oh so we'd have to inject ourselves somewhere in the middle. Or make some new sort of
debugpy-serverthat then runs the<my-server>