Commit fb467d8
Fix: ContinueRequest with specific threadId resumes all threads (in-process adapter fix) (#2012)
* Initial plan
* Fix multi-thread resume when in-process debug adapter is used
Per the DAP spec, a ContinueRequest should resume all threads unless
singleThread=True is explicitly set. Previously, only the out-of-process
adapter path worked correctly (it transformed threadId to '*' before
forwarding to pydevd). With the in-process adapter, the specific threadId
reached pydevd directly but was only used to resume that one thread.
Fix on_continue_request to set thread_id='*' whenever singleThread is not
True, regardless of multi_threads_single_notification. Also update
write_continue test helper and add a regression test.
Fixes: #2009
Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
* Use getattr for safe singleThread attribute access in on_continue_request
Most DAP clients omit the optional singleThread field entirely. Using
getattr(arguments, 'singleThread', False) is more defensive than direct
attribute access, guarding against any non-standard arguments objects.
Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
* Add timeout failure comment in test; keep intentional TEST SUCEEDED convention
The 'TEST SUCEEDED' misspelling is an intentional convention in the pydevd
test framework (debugger_unittest.py checks stdout for this exact string).
Revert the resource file to preserve the convention while still adding the
explanatory comment requested in the test method.
Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>1 parent b7f2433 commit fb467d8
3 files changed
Lines changed: 79 additions & 7 deletions
File tree
- src/debugpy/_vendored/pydevd
- _pydevd_bundle
- tests_python
- resources
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
563 | 571 | | |
564 | 572 | | |
565 | 573 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
Lines changed: 45 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
395 | 398 | | |
396 | 399 | | |
397 | | - | |
398 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
| |||
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
409 | | - | |
410 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
411 | 417 | | |
412 | 418 | | |
413 | 419 | | |
| |||
800 | 806 | | |
801 | 807 | | |
802 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
803 | 812 | | |
804 | 813 | | |
805 | 814 | | |
| |||
808 | 817 | | |
809 | 818 | | |
810 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
811 | 850 | | |
812 | 851 | | |
813 | 852 | | |
| |||
0 commit comments