microsoft / microsoft/vscode-python-debugger

No Config Debugging errors when multiple vscode windows are open

Open
#916 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage-needed verification-needed
Dominant language
TypeScript
Stars
181
Forks
126
Avg merge
2d 3h
Merged PRs (30d)
3

Description

If I use the no config debugging feature with multiple vscode windows open, all of them try to start debugging. Whichever is first suceeds and the rest throw a Server[pid=xxxx] is already being debugged error.

The cause for this is that the extension watches the .noConfigDebugAdapterEndpoints dir and starts debugging if any file appears in it not just if the specified file (VSCODE_DEBUGPY_ADAPTER_ENDPOINTS) is created. Each window has a separate endpoint file in the .noConfigDebugAdapterEndpoints dir, but due to watching for any file, every window will start debugging.

https://github.com/microsoft/vscode-python-debugger/blob/d7b96430e7dda95cc3d6565364e3639a2b9501c3/src/extension/noConfigDebugInit.ts#L95-L97

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.

Research direction

Start in src/extension/noConfigDebugInit.ts around lines 95-97 and read how the .noConfigDebugAdapterEndpoints directory is watched. Confirm that debugging starts only when the endpoint file named by VSCODE_DEBUGPY_ADAPTER_ENDPOINTS is created, so separate VS Code windows do not react to one another's files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.