<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Michael,<div>I have tried to reproduce your issue (BTW, which version of LLDB are you using? - I have tried with a revision of the code from yesterday).</div><div>I have defined your script as a Python command using "command script add".</div><div>In my case, there is no lockup, but the SBThread::StepOver() function appears to "over-step" and the test program terminates prematurely at the end of the stepping.</div><div>The issue, which effectively does not occur when sleeping between the several calls, seems to be related to the StepOver() method itself. I have also tried changing the lldb.thread.StepOver() call with debugger.HandleCommand("thread step-over -m this-thread"), but doing so, the test program terminates and the thread gets deselected. If thread.StepOver() is replaced with some other operation that does not involve threading (I have used debugger.HandleCommand("frame variable") in my example), everything works as it should.</div><div>I would bet the issue lies in stepping over itself, but I have never worked on ThreadPlans, so I leave it to someone who knows more about them.</div><div><br></div><div>As per your second question, you may want to try the solution described here: <a href="http://stackoverflow.com/questions/230751/how-to-flush-output-of-python-print">http://stackoverflow.com/questions/230751/how-to-flush-output-of-python-print</a></div><div><br></div><div>I have attached the Python script and test program used.</div><div><br></div><div></div></body></html>