0

I have just started learning visual debugging in Xcode and I would like to know if I can simplify the debugging process. A typical debugging session starts with:

$ e -l Swift -- import UIKit
$ e -l Swift -- let $myLabel = unsafeBitCast(..., UIView.self)
$ e -l Swift -- // use $myLabel

Is there any way I can omit:

$ e -l Swift --

And change it to, for example:

$ SDB

So I can write:

$ SDB import UIKit
$ SDB let $myLabel = unsafeBitCast(..., UIView.self)
$ SDB // use $myLabel

I am not very familiar with talking to the command line. I think I need to add some command to PATH? But I am confused where this PATH is for LLDB debugging.

How can I add a shortcut for LLDB debugging in Xcode?

Sidequestion: what is the -l for before Swift in above commands? This command does not work: man lldb so I can not look it up and Google doesn't help me also. Without the -l, debugging fails. Same applies for the $ sign before every variable. I do not know why I need to add that.

Cœur
  • 37,241
  • 25
  • 195
  • 267
J. Doe
  • 12,159
  • 9
  • 60
  • 114

0 Answers0