Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling methods from Xcode Debugger?

what's the correct way to call a method from the Xcode debugger command line ?

For example if I'm inside the sort: method of my class A (using the debugger), how can I call debugSort: method that belongs to class A too ?

( My code is Objective-C btw )

like image 919
Goles Avatar asked Dec 16 '09 15:12

Goles


1 Answers

To call an Objective-C method in the gdb console, you have to cast the return type (since gdb doesn't really know what the return value is):

(gdb) call (void)[textField setStringValue: @"Bork"]

—Quickies for gdb
like image 171
Vincent Gable Avatar answered Sep 30 '22 18:09

Vincent Gable