Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I debug .a libs(c++ and I have source code) in a Xamarin.forms project?

I have a Xamarin.Forms project and there are also some .a libs(C++) referenced in Xamarin.iOS project.

Xamarin.Forms project

  ------codes

Xamarin.iOS project

  ------codes

  ------.a libs(c++)

I do have the source code of those .a C++ libs.

The question is that is there a way that I can debug the C++ source code when running the Xamarin.forms project?

Update:

I just followed this document and the Xcode does not attach to the Xamarin app when it launches. Any idea?

like image 453
jjjjj Avatar asked Nov 12 '21 07:11

jjjjj


People also ask

Can I use C++ with xamarin?

Visual C++ for cross-platform mobile development enables the C/C++ and C# code to be built as part of the same solution, offering many advantages including a unified debugging experience. Microsoft has used C/C++ and Xamarin in this way to deliver apps such as Hyperlapse Mobile and Pix Camera.


Video Answer


1 Answers

You cannot debug C++ in a xamarin.ios project, it is not supported and was confirmed by Microsoft's dev team.

Possible solution will be to mix objectiv-C and C++ code together in your xcode application.

Otherwise you will not be able to debug native code.

reference for help:

Using native libraries in xamarin

like image 92
Barr J Avatar answered Oct 19 '22 15:10

Barr J