Skip to content

How to debug cmdline scripts with options used in a sequence of piped cmds with VS Code #1498

Answered by int19h
udgithub asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that at the moment, when you press F5, this always corresponds to a single debug session with possible child subprocesses. So if your main script spins up another Python instance, that will actually connect to the same port for debugging, and things will work - but it works because it reports itself as a subprocess of the main process. If a new connection comes in on the same port but is not a related process, the debug adapter rejects it. Fundamentally this is because the current implementation of adapter assumes that there's only one root process in the session, and some of its logic would break if that is not the case.

But in principle, we could implement multi-rooted pr…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@udgithub
Comment options

@int19h
Comment options

Answer selected by udgithub
@udgithub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants