On Sat, Sep 09 2023, Eli Zaretskii wrote: > So I think the only reasonably practical way to make this particular > use case stable is to disable thread switching for as long as the > debugger is active. WDYT? Having to disable thread switching for so long would be quite unfortunate. I think that is safe for the debuggee to call condition-wait or accept-process-output on a specific pipe process. That should be enough to implement some form of channel/mailbox to communicate between the debuggee and the main thread. The debuggee would then read commands from that channel and the main thread would send messages to that channel instead of executing the commands. Something like the patch in the attachment.