Debugging Android

SebastianKruseSebastianKruse USMember ✭✭✭
edited January 2017 in Xamarin.Forms

Yesterday I got an error while trying to debug that states "Debug will disabled" due to this error. Now I need to debug some stuff because I got a wired error on Android. But the break points are not hit. I cannot find anything how I can "activate" debugging. In the iOS part of my forms application the debugging still works fine. I already tried "[Application(Debuggable=true)]" but it changed nothing. Also a new checkout of my repository (without any temp files like *.suo, *.user or bin and obj folder) changed nothing. The debugging does not work at all. In a complete different application the debugging works for Android so I guess it must be some change in the project files itself that caused the error.

Edit: The breakpoints and debugging in the Droid-Project itself work. Just in the shared project it is not working.

Best Answer

  • SebastianKruseSebastianKruse US ✭✭✭
    Accepted Answer

    Fixed the debugging issue. Seems that the debugger has a problem with the AfterBuild-Script I use for version strings.

Answers

  • yousufctecyousufctec USMember ✭✭✭

    Hi @SebastianKruse,
    Are you sure, the settings inside the Android Project Properties -> Android Options ->Enable developer instrumentation is enabled and also selected as Xamarin below? Also check your PCL project and all other projects were pointing to Debug. Rather than checking out your bin and obj folder, just try deleting it and try again.

    Thanks!

    Yousuf.

  • SebastianKruseSebastianKruse USMember ✭✭✭

    @yousufctec said:
    Hi @SebastianKruse,
    Are you sure, the settings inside the Android Project Properties -> Android Options ->Enable developer instrumentation is enabled and also selected as Xamarin below? Also check your PCL project and all other projects were pointing to Debug. Rather than checking out your bin and obj folder, just try deleting it and try again.

    Thanks!

    Yousuf.

    Already tried it all. The debugging in the Android project itself works. Only in the shared project it wont do anything since I use a library for In-App-Billing. For the shared project there is no option as debug or release or a bin/obj folder because I guess it is lined into the projects while compiling. Under iOS the debugging works just fine. Also in UWP. Only for Android nothing happens. So bad that only there is a bad exception if I try to test In-App-Billing...

  • yousufctecyousufctec USMember ✭✭✭

    @SebastianKruse So are you getting your screens that designed from the PCL shared project? Can you please check the targets of your PCL project whether it contains the Android platform as well. Also please check the minimum SDK version and your emulator or mobile SDK version.

    Thanks!

    Yousuf.

  • SebastianKruseSebastianKruse USMember ✭✭✭

    It is not really a PCL project (or is it?). There are no options or anything for this project. This is my project structure: http://puu.sh/tMNj8/66f783f501.png - The debugging works in "LottoStats.Droid" and "LottoStats.Localization" but I need to debug the code in the "LottoStats" shared-"project" and a week ago this works fine ... until I need to debug something >.<

  • SebastianKruseSebastianKruse USMember ✭✭✭
    Accepted Answer

    Fixed the debugging issue. Seems that the debugger has a problem with the AfterBuild-Script I use for version strings.

Sign In or Register to comment.