3

When I debug a multi-threaded Python program using vscode, I found all threads were suspended when a breakpoint is hitted. Is there any way to choose to suspend only one thread or all like what Pycharm does?

Xzmong
  • 31
  • 2
  • thats a strange requirement. Can you tell the reason for this? – targhs Nov 14 '21 at 21:04
  • 2
    Speaking for myself, this can be a problem when you have communication threads that are expected by a client app to be active. In my case, I'm communicating with a robot that implements a heartbeat protocol. If 1000ms passes without a response, it closes the connection. – Ken Seehart Feb 08 '22 at 04:37
  • 1
    I have the exact same problem as the OP. Need to pause a single thread without also pausing keep-alive thread. The current solution seems to be to use Pycharm because you can do this in Pycharm. – John Scolaro Apr 04 '22 at 00:06
  • 1
    https://stackoverflow.com/questions/67369644/how-to-freeze-a-thread-in-vscode-during-c-debugging Same question for C++ – David Apr 07 '22 at 07:01

0 Answers0