Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native thread tracing in frame eval mode / disable qt monkeypatching by default. #452

Merged
merged 2 commits into from
Nov 5, 2020

Conversation

fabioz
Copy link
Collaborator

@fabioz fabioz commented Oct 30, 2020

This pull request does a few things:

  1. It automatically creates a DummyThread for native threads and sets the tracing (called from the frame eval mode). This enables native threads to be traced by default when using the frame eval mode.

  2. Disable the qt monkeypatching by default (it's still available to be used when frame eval is not available, but given that just importing qt seems to have side effects: Debugger times out when "qt":"auto" is used with ArcGIS Python #362, disabling by default is probably the proper thing to do anyways).

  3. Use the internal version of the call tracing hook (this fixes the CPython issue: https://bugs.python.org/issue42197 for the debugger for all supported versions of CPython as the internal call tracing hook doesn't call the functions to update the locals) -- the debugger isn't as affected by this because it tries to not trace any context whenever possible, but when actually stepping or if the tracing must be kept on because exceptions are being tracked, this should be a noticeable performance improvement.

@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@int19h
Copy link
Contributor

int19h commented Nov 3, 2020

Nice! Yes, the Qt change should be okay, since it would only apply to 2.7 and 3.5.

@fabioz fabioz merged commit ad09acb into microsoft:main Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants