Skip to content

"Reload window" breaks EH debugging #55955

Closed
@weinand

Description

@weinand

VS Code Insider (1.26):

  • use the "Hello World" extension.
  • F5
  • in the new window do a "Reload Window"

Observe:

  • extension reloads
  • VS Code restarts debug session
  • after 10 seconds this message appears:
    2018-08-07_17-59-28

Analysis:
I tried to reproduce this when running out of source, but I couldn't.
This makes me think that the problem is a timing issue.

Looking at the dev tools console and our own debug console has some evidence that supports this hypothesis:

2018-08-07_18-03-19

Explanation:

EH Debugging assigns debug port 8790 for the debug session (and the idea is that the EH continues to use this port even after being restarted).
However the dev tools console shows that the restarted EH listens on port 8791 after the "reload window".

This means that it could not open port 8790 and picked the next available: 8791.
The reason why 8790 is not available is probably because 8790 is still in use because the EH is still running. I haven't seen this behaviour in EH debugging before, but it could be a new feature of the updated node.js version we are using.

The consequence of this is that VS Code tries to attach (again) to port 8790 instead of 8791 which results is the broken EH experience.

And this is probably the deeper issue behind #55916 and #55025.

I do not yet know what exactly has changed and I do not have a fix.

/cc @bpasero @roblourens any ideas?

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasedebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions