Skip to content

Threads are not fetched after restarting debug adapter #88784

Closed

Description

@dlech
  • VSCode Version: 1.41
  • OS Version: Ubuntu 18.04

Steps to Reproduce:

  1. Create a debug adapter
  2. Implement the pause feature
  3. Run the debug adapter and see that pause works
  4. Restart the debug adapter using the restart button
  5. Observer that pause no longer works

Does this issue occur when all extensions are disabled?: Yes/No


The commit d527e92 is used to slow down fetching threads from a debug adapter. However, when using the default restart mechanism, fetchThreadsScheduler is disposed (via dispose(this.rawListeners); and therefore no longer runs after restarting the debug adapter.

Activity

  1. added
    debug
    bug
    on Jan 16, 2020
  2. isidorn commented on Jan 16, 2020

    @isidorn

    Thanks for filling this issue.
    Can you be so kind to fork Mock Debug https://github.com/microsoft/vscode-mock-debug and to create changes on top of it such that this issue is reproducable.
    Since I can not reproduce it using node - gif attached

    pause

  3. added
    info-needed
    and removed
    bug
    on Jan 16, 2020
  4. dlech commented on Jan 16, 2020

    @dlech
    ContributorAuthor

    It looks like I was missing sending an InitializedEvent so the same debug session was being reused after restart.

  5. dlech commented on Jan 16, 2020

    @dlech
    ContributorAuthor

    I also made this comment in the pull request:

    The specification says "A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the ‘initialize’ request has finished)."

    So either the specification needs to say "required" instead of "expected" or there is a bug in VS Code. VS Code doesn't seem to correctly handle the situation where the debug adapter never sends InitializedEvent. Although the fix may be to create a new debug session object instead of the fix that I have proposed.

  6. dlech commented on Jan 16, 2020

    @dlech
    ContributorAuthor

    Simply removing the line that sends InitializedEvent from the mock debug unfortunately extension doesn't seem to be enough to reproduce the problem, but since I found a workaround, I can't really justify spending more time on it.

  7. added a commit that references this issue on Jan 17, 2020
    6b7dd54
  8. added
    under-discussion
    and removed
    info-needed
    on Jan 17, 2020
  9. isidorn commented on Jan 21, 2020

    @isidorn

    David Lechner (@dlech) did you verify that this works with the latest VS Code insiders as expected?

  10. locked and limited conversation to collaborators on Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugunder-discussion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions