Vyachaslav Gerchicov
Vyachaslav Gerchicov

Reputation: 2457

Call "expr" in xCode console automatically?

I need to perform a command in console:

expr @import UIKit

This command makes lldb more similar to gdb. It is better than to add an implicit type conversion to each CGPoint or CGRect value but I need to perform this after each relaunch. How to automate this process?

Upvotes: 1

Views: 327

Answers (1)

Jim Ingham
Jim Ingham

Reputation: 27238

Best way to do this in Xcode right now is to put a breakpoint on main, set it to auto-continue, and then add your expression to the commands. There are situations where you need to debug code before you hit main (e.g. library startup code) but that's pretty infrequent...

Then if you want all your projects to inherit this breakpoint, open the breakpoints navigator, right-click on the breakpoint and choose Move To->User. Then it will be present in all your projects.

Upvotes: 1

Related Questions