-
Notifications
You must be signed in to change notification settings - Fork 35
Debug session becomes unsynchronized during long step_over and cannot be stopped #29
Open
Description
I’m seeing inconsistent behavior when DebugMCP handles long-running operations during step_over.
Scenario 1 – Function with sleep
demo_run.py
from utils import demo def main() -> None: print('Start') demo() print('End') if __name__ == "__main__": main()
utils.py
from time import sleep def demo(): sleep(100) print('in demo')
Failure Behavior:
When execution reaches demo() and sleep(100) is still running, step_over fails with:
Debug session is not ready. Please wait for initialization to complete.
Attempting stop_debugging afterward fails with:
No active debug session to stop
In the end the debug session is still running and must be terminated manually.
Scenario 2 – Sleep inside main
from time import sleep def main() -> None: print('Start') sleep(100) print('End') if __name__ == "__main__": main()
Result: step_over times out while sleep(100) is still executing, and the agent later fails to stop debugging.
Issues:
step_overtimes out or reports invalid session while code is still executing.stop_debuggingfails to terminate an active session after such errors.
Expected Behavior:
- Long-running execution should not invalidate the session.
step_overshould wait or return a clear "execution in progress" state.stop_debuggingshould reliably stop any active session.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.