Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow multiple debug connections in VS code using the same port

Open
#1,501 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, vscode

Research direction

The issue names no debugpy files or tests; start by tracing the --connect path and the VS Code attach configuration shown in the report. Done means one attach configuration can accept and handle multiple incoming connections on the same port.

Written by the indexing model from the issue text.

Description

Hello debugpy team, hi Pavel,

the discussion
"How to debug cmdline scripts with options used in a sequence of piped cmds with VS Code" https://github.com/microsoft/debugpy/discussions/1498
described a way to debug multiple calls of a cmdline script in a sequence of linux commands using a pipe.
In this example the debug connection has been opened from the script to a listening VS code IDE using --connect

If we have a sequence of calls like so
cat myfile | python -m debugpy --connect 5678 ./python-script-1.py --option1=x | python -m debugpy --connect 5679 python-script-2.py --option2=y
we have to use several ports and we have to start several debug sessions in VS code using their own debug settings for each port.
It would be better, if VS code would only need one debug config for multiple incoming connections and could handle them.
Example:

            "name": "Python: Listen 5678",
            "type": "python",
            "request": "attach",
            "listen": {
                "host": "localhost",
                "port": 5678,
                "allow_multiple_connections": "true"    *** NEW ***
            },
        },

This behaviour would be similar to PHP debugging using xdebug and VS code or PHPstrom.

Thanks a lot in advance for realizing this perhaps in the future.

Best regards, Uwe

Dominant language
Python
Stars
2.5k
Forks
202
Avg merge
5d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.