Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Added handling of unhandled exception generated when VS Code disconnects #823

Merged
merged 1 commit into from
Sep 21, 2018
Merged

Conversation

ahaslam
Copy link
Contributor

@ahaslam ahaslam commented Sep 20, 2018

Detaching from a VSCode debug session via localhost:3000 on Windows 10 using the debug 'disconnect' button results in an unhandled exception in wrapper.py.

The specific unhandled error is errno.ECONNRESET (10054)

When this exception is not handled correctly, the instance of ptvsd becomes unresponsive and does not allow the debugger to connect again.

Notes:
This change fixes this issue but I can see that convert_eof() in socket.py should be handling this error and raising an EOFError exception - but for some reason it's not and a socket.error with errno == 10054 is raised instead.

…ssion in VS Code using the debug 'disconnect' button. Prevents the ptvsd from becoming unresponsive
@ahaslam ahaslam changed the title Added unhandled exception generated when VS Code disconnects Added handling of unhandled exception generated when VS Code disconnects Sep 20, 2018
@karthiknadig karthiknadig requested a review from int19h September 20, 2018 22:57
@codecov-io
Copy link

Codecov Report

Merging #823 into master will decrease coverage by 0.09%.
The diff coverage is 12.5%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #823     +/-   ##
========================================
- Coverage    59.4%   59.3%   -0.1%     
========================================
  Files          28      28             
  Lines        3929    3937      +8     
========================================
+ Hits         2334    2335      +1     
- Misses       1595    1602      +7
Impacted Files Coverage Δ
ptvsd/wrapper.py 51.18% <12.5%> (-0.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3d3345...eb00857. Read the comment docs.

@int19h
Copy link
Contributor

int19h commented Sep 21, 2018

Thank you for the fix! We'll look into the underlying issue.

@int19h int19h merged commit c3217df into microsoft:master Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants