James Moore
James Moore

Reputation: 9027

Xamarin Studio + Xamarin.iOS: how do you set a breakpoint in C or C++ (not F# or C#)?

Running Xamarin Studio 4.1.9, Xamarin.iOS.

When you've linked native code into your application, how do you set breakpoints in that native code?

Upvotes: 2

Views: 366

Answers (1)

poupou
poupou

Reputation: 43543

The simplest way is to use a native debugger (e.g. gdb or lldb) to attach to an existing process, e.g. using --pid=XXXXX. Then you can set breakpoints, break/continue execution, set watches... just like you would do with the managed debugger.

This works even if you're debugging the managed side using the managed debugger (inside Xamarin.Studio) but you have to switch back and forth debuggers (e.g. when a breakpoint is hit).

Note: You can use the native debuggers as-is (command-line) or from some GUI (e.g. Xcode).

Upvotes: 2

Related Questions