Uploaded image for project: 'Swift'
  1. Swift
  2. SR-13499

LLDB does not cope well with breakpoints in dynamically loaded code.



    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: LLDB for Swift
    • Labels:
    • Environment:

      Xcode 12 betas up to 6, Catalina 10.15.6


      Hi Apple,

      I was going to raise a radar but I see there is a category here for "LLDB for Swift" and this very much fits that category. I have an App that allows developers to inject code into applications while they are running perhaps best summarised here and there is an open issue against the repo with problems accessing self when breakpointing code that has been injected. Breakpoints themselves actually work.

      I've tried to investigate this and gone through the many steps to be able to work on lldb in an Xcode project and log information and I have to say I've met my match in terms of being able to find a solution. If this problem were a priority it would need to be looked at by someone more familiar with the code. As far as I can see the dynamically loaded code dylib which only contains the single file injected is treated as it's module rather than the app bundle and as a result lldb has problems looking up things like the class that owns the method being debugged and as a result can't resolve self, either in the console or the variable browser to the left hand side in Xcode.

      If there was any chance someone could take a look at this I and no doubt a few others would appreciate it. Maybe someday this approach will find its way into being supported by Xcode and this would be one of the problems that would benefit from time invested at this stage.






            johnno1962 John Holdsworth
            0 Vote for this issue
            2 Start watching this issue