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_over times out or reports invalid session while code is still executing.
stop_debugging fails to terminate an active session after such errors.
Expected Behavior:
- Long-running execution should not invalidate the session.
step_over should wait or return a clear "execution in progress" state.
stop_debugging should reliably stop any active session.
I’m seeing inconsistent behavior when DebugMCP handles long-running operations during
step_over.Scenario 1 – Function with sleep
demo_run.py
utils.py
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 stopIn the end the debug session is still running and must be terminated manually.
Scenario 2 – Sleep inside main
Result:
step_overtimes out whilesleep(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:
step_overshould wait or return a clear "execution in progress" state.stop_debuggingshould reliably stop any active session.