ios - How to change NSURL variable value while debugging with LLVM in XCode using expr command? -


in xcode, lldb change variable value expr command while debugging(see how change variables value while debugging llvm in xcode?). used method change string value successfully, when change nsurl variable new instance, got error:

(lldb) expr url = [nsurl urlwithstring:@"www.example.com"]; error: no known method '+urlwithstring:'; cast message send method's return type error: 1 errors parsing expression 

how change url new value? thanks.

you may try explicitly casting, i.e.

expr url = (nsurl *)[nsurl urlwithstring:@"www.example.com"]; 

because lldb cannot obtain return type. example,

// should specify return type here: expr (int)[uiapplication version]  // instead of expr [uiapplication version] 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -