Skip to content

Conversation

@lukejriddle
Copy link
Contributor

Previously, already-suspended threads could still be modified by subsequent calls to suspend_all_threads. This change adds checks to prevent this.

@fabioz
Copy link
Owner

fabioz commented Dec 3, 2024

This doesn't seem correct (which is probably why tests are failing).

I guess I also don't understand the real issue behind the need for this change.

@lukejriddle
Copy link
Contributor Author

We've encountered some issues where upon reaching a breakpoint location, pydevd will try to suspend all other threads. But at this point, another thread might race and reach this codepath as well and try to suspend all threads as well, before the suspended state notification is fired. This can cause pydevd not to emit a thread suspend notification (i.e. to debugpy and thus to VS Code), so the debugger UI never refreshes even though breakpoints where hit.

I'm trying to figure out the tests before I publish this. They all seem related to django?

@lukejriddle
Copy link
Contributor Author

Thought I had a fix but didn't. Will revisit this later

@lukejriddle
Copy link
Contributor Author

@fabioz Any advice running the tests_python locally? I followed a similar setup to the GitHub actions workflow on a Linux host but am running into timeout errors in pytest.

@lukejriddle lukejriddle closed this Jul 9, 2025
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