Skip to content

No Config Debugging errors when multiple vscode windows are open #916

@Zentrik

Description

@Zentrik

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.

// create file system watcher for the debuggerAdapterEndpointFolder for when the communication port is written
const fileSystemWatcher = createFileSystemWatcher(new RelativePattern(tempDirPath, '**/*.txt'));
const fileCreationEvent = fileSystemWatcher.onDidCreate(async (uri) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions