-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
Feature Request: Option to disable debugging for specific threads
Description
Currently, debugpy does not provide an option to disable debugging for specific threads. This becomes challenging in multi-threaded applications where certain threads need to run without interruptions caused by breakpoints or debugging overhead.
Proposed Solution
Introduce an API or configuration option (e.g., disable_debug_for_thread(thread_id) or a similar mechanism) to exclude specific threads from being debugged.
Use Case
In a multi-threaded application, developers might want to focus debugging only on specific threads while allowing others to execute uninterrupted. This feature would improve debugging efficiency in complex scenarios.
Additional Notes
- A similar feature exists in some other debugging tools, and it greatly enhances usability in multi-threaded applications.
- If possible, allow thread-specific logging as an additional option.
import threading
import sys
def thread_function():
# Simulate disabling debugging for this thread
sys.settrace(None) # This disables debugging for the current thread
# Simulate work
for i in range(5):
print(f"Thread running iteration {i}")
import time
time.sleep(1)
roechele
Metadata
Metadata
Assignees
Labels
No labels