-
Notifications
You must be signed in to change notification settings - Fork 67
Fix #325: Debuggee no longer terminates #424
Conversation
Terminate the process immediately instead of closing pydevd socket when disconnecting after launch.
@@ -13,6 +14,16 @@ | |||
warnings.warn(msg + ':\n {}'.format('\n '.join(_unvendored))) | |||
|
|||
|
|||
# Constants must be set before importing any other pydevd module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related, but gets rid of the Cython warning (again).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than key reattach-related question, LGTM.
self.close() | ||
# Closing the socket causes pydevd to resume all threads, | ||
# so just terminate the process altogether. | ||
sys.exit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this prevent re-attach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will, but in this scenario (launch), there's not supposed to be one - disconnect after launch means terminate debuggee, or at least that's how we have always implemented it so far in the old debugger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, on_disconnect()
doesn't call _handle_disconnect()
in the "attach" case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Terminate the process immediately instead of closing pydevd socket when disconnecting after launch.
(fixes #325)