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

Fix #325: Debuggee no longer terminates #424

Merged
merged 1 commit into from
May 21, 2018
Merged

Conversation

int19h
Copy link
Contributor

@int19h int19h commented May 21, 2018

Terminate the process immediately instead of closing pydevd socket when disconnecting after launch.

(fixes #325)

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
Copy link
Contributor Author

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).

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a 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)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@int19h int19h merged commit 38b6878 into microsoft:master May 21, 2018
@int19h int19h deleted the 325 branch November 15, 2018 07:50
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.

Debuggee no longer terminates
2 participants