Possible Xcode Bug?: Thread Frame Views do not update, when stepped via LLDB script

Hello,


I am trying to add an LLDB command via a Python script, one which adds a custom 'step' operation. I've been able to add a new command, execute it from within Xcode's Console view, and get it to step through the current frame (in the current thread), however, Xcode's user interface does not update to reflect the new location of the program counter. Neither the stack trace in the Debug Navigator, nor the highlighted line in the code editor (that indicates the current line), will update if and when I run this custom command. lldb, when asked via direct commands (issued through Xcode's Console view), will report that the program counter has updated and that the stack trace is different, however Xcode's UI will not update, at least until one of the stock, lldb, 'step*' command(s) are run.


I am using Xcode Version 8.3.2 (8E2002). This issue has occurred for me when debugging Mac apps, and iOS apps.


Here is simplified, and tested code for the custom lldb command, which I am working on:


#!/usr/bin/python

import lldb

def stepfancy(debugger, command, result, internal_dict):
  thread = debugger.GetSelectedTarget().GetProcess().GetSelectedThread()
  thread.StepInto(True)

def __lldb_init_module(debugger, dict):
  debugger.HandleCommand('command script add -f stepfancy.stepfancy stepfancy')
  print 'The "stepfancy" python command has been installed and is ready for use.'


If saved in the file, "~/stepfancy.py", I've been loading it via the following lldb command, run while an app's execution is paused:


command script import ~/stepfancy.py


I then run my custom step several times, each by issuing the command:


stepfancy


No changes to Xcode's UI ever occur after this command is run. I can observe the stack trace change in the Console window, however, by running:


bt 1


If I run a stock, "step" command, then Xcode's UI will update, with program state-changes being applied from *BOTH* the vanilla "step" command, as well as the prior, custom, "stepfancy" command(s).


Is this lack-of-UI-updating, expected behavior in Xcode?


Is there a way to tell Xcode's UI to update, after having a custom, lldb command, step through the program's code? I would be fine adding extra Python code to tell Xcode to update, after I perform step operation(s), via the script.


Cheers!

-- David Ludwig

Possible Xcode Bug?: Thread Frame Views do not update, when stepped via LLDB script
 
 
Q