Skip to content

getDebugAdapterTrackers code breaks debugger when debugging development extensions #103477

Closed

Description

@DanTup

Whenever I debug my extension code from source and then start a debug session, the debugger (in the VS Code that's hosting my source code) breaks on a timeout:

Screenshot 2020-07-28 at 11 30 51

I only have the debug settings to break on "Uncaught exceptions", but it still breaks here. I believe the source is this code here:

return Promise.race([
Promise.all(promises).then(result => {
const trackers = <vscode.DebugAdapterTracker[]>result.filter(t => !!t); // filter null
if (trackers.length > 0) {
return new MultiTracker(trackers);
}
return undefined;
}),
new Promise<never>((resolve, reject) => {
const timeout = setTimeout(() => {
clearTimeout(timeout);
reject(new Error('timeout'));
}, 1000);
})
]).catch(err => {
// ignore errors
return undefined;
});

I'm not sure why the code is timing out (or exactly what it's doing), but it's quite annoying to have to click resume in the debugger back in the "other" VS Code when trying to test things in my extension host.

(I can't repro this in MockDebug, but I don't know why - I'm not familiar with what this code is trying to do).

Activity

  1. added
    debug
    on Jul 28, 2020
  2. added
    bug
    on Nov 5, 2020
  3. added a commit that references this issue on Nov 22, 2022
    c83d5c1
  4. added a commit that references this issue on Nov 22, 2022
    5d7b5a3
  5. added
    unreleased
    on Nov 22, 2022
  6. added
    insiders-released
    and removed
    unreleased
    on Nov 23, 2022
  7. added
    verification-steps-needed
    on Dec 2, 2022
  8. locked and limited conversation to collaborators on Jan 6, 2023
  9. added
    verified
    on Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdebuginsiders-releasedverification-steps-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions