Forum Xamarin.iOS

Xamarin Debugger not hitting the breakpoints

I am new to Xamarin.iOS. I have the C# development background. I am facing an issue while debugging when connected to the device. Some breakpoints work well. but some are not working. I added a TableViewController. I am unable to hit any breakpoints inside the controller. Following are my development environment details:

=== Xamarin Studio ===
Version 5.8.3 (build 1)

=== Apple Developer Tools ===
Xcode 6.3 (7569)
Build 6D570

=== Xamarin.Mac ===
Not Installed

=== Xamarin.iOS ===
Version: (Trial Edition)

=== Operating System ===
Mac OS X 10.10.3

=== Device ===
iPhone 6 Plus
OS Version: 8.3

Any help?



  • SimonBurgessSimonBurgess GBMember
    edited April 2015

    I'm having the same problem since upgrading XCode to 6.3 for iOS 8.3 support but using I'm Visual Studio.

    There is debug output being seen in the Visual Studio Output window from the device but breakpoints are not being hit.

    I'm using:

    === Visual Studio 2013 Pro ===
    Version: 12.0.31101.00 Update 4

    === Xamarin for Visual Studio (Paid) ===
    Version: 3.9.547

    === Xamarin.iOS ===

    === Xamarin.iOS Build Host ===

    === XCode ====
    Version: 6.3 (6D570)

    === Device ===
    Any iPhoneSimulator and any iOS device.

    Both Visual Studio and Xamarin Studio (on the Mac) are showing as up-to-date.

  • SimonBurgessSimonBurgess GBMember

    Weirdly, changing between between two debug enabled build configs everything came back in life.

  • haider.7868haider.7868 USMember

    On my side the issue is with camera capturing. I tried both UIImagePickerController and the Xamarin.Mobile library. The breakpoints never get hit inside the callback of photo capture e.g. FinishedPickingMedia in case of UIImagePickerController. Also after capturing around 20 pictures the app gets crashed while capturing more photos.

    If I slightly change the code to choose the photo from gallery/library instead of capturing from camera then all breakpoints work fine and also the app never crashes.

  • AdamGreeneAdamGreene USMember

    I too am experiencing an issue where a breakpoint is not being hit. But if I put a breakpoint farther down the call tree, I can see that it really did call the method in question, just didn't hit the break point. Is there any word on this issue / bug reports filed?

  • JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

    I've had it a few times when debugging iOS from Visual Studio - usually resort to restarting VS and the iOS simulator and doing a clean build and it works.

    The painful thing it - I know when my debugging will break next time because stopping the app running in VS causes it to hang until I kill the iOS simulator. If the code stops cleanly then I know it won't debug next time.

    Just one of those things with Xamarin I guess.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Same problem here. No longer hits breakpoints in Visual Studio running iOS simulator. Currently unable to debug code.

    Running latest Xamarin stable, latest xCode update, VS with update 4.

  • haider.7868haider.7868 USMember

    I tested it on iPhone 5 having OS 8.3, iPhone 6 having OS 8.1.3 and iPad having OS 8.3 and the debugger worked fine. But it seems like the debugger is not hitting the breakpoints when I run it on iPhone 6 with OS 8.3 or iPhone 6 Plus with OS 8.3. As I mentioned before the problem is with the camera libraries as the debugger works fine for other controls or libraries but when I try to debug the camera capture callback it fails to debug.

  • YegoriusYegorius USMember

    We ran into this issue earlier this week, though it's difficult to pinpoint exactly when... Here are some notes on our issue:

    What doesn't work:
    We had one of our guys reinstall the latest version of stable XS but the still issue persists.
    I uninstalled XS from my mac and installed an earlier version from March 10, 2015 (5.8 build 443) but still same. I can hit breakpoints in our main executable project, but the supporting library projects won't hit.

    What works:
    With latest XS, debugging Xamarin's TaskyiOS solution works.
    But in our project, when we set breakpoints, they appeared as red donuts, instead of circles. That indicates that the debug symbols were missing. For the projects that you can't debug, change Compiler > Debug information to Full. This fixed it for me, but I'm on March 10 XS build now, I don't know if it will work with latest version.

  • PeterDedenePeterDedene BEMember ✭✭

    I'm facing the same issue. Since several weeks - I believe since updating to XCode 6.3 stable, not the previous developer previews - the Xamarin Studio debugger is no longer working for major parts of our applications. In some places it still works, but in most it doesn't.

    Sometimes Xamarin Studio throws a "Debugger operation failed: Cannot set breakpoint on the specified IL offset." error, most of the times it does not and the breakpoints remain hollow red donuts.



    it is sometimes possible to get the debugger to stop at a certain point, but stepping of evaluating using the "Immediate" tab is not possible.

    Does anyone at Xamarin have any idea for a solution or a fix?

  • I am having the same problem. I updated Xamarin iOS inside Visual Studio and debugging stopped working for portable libraries but it is working inside the iOS project.

    However if I change the debugging from iPhoneSimulator to iPhone and vice versa the break points inside the pcl start working but if I change the code inside the pcl the break point will not hit anymore.

    These are the versions I am using.
    Xamarin 3.11.445.0
    Visual Studio 2013 version 12.0.31101.00 update 4

    Hope this will be fixed soon, it's difficult not being able to debug.

  • VeYroNVeYroN PTMember ✭✭

    Well, i had the same problem.. What i've done was create a new project, copying all resources to the new project.
    Also, i've changed the namespace (don't know if it was needed or not)

    Hope this helps!

  • JohnWilsonJohnWilson USMember

    I've got exactly the same problem (among others). Additionally I have started seeing this message appear in the debugging output:

    xxxiOS[5321:1616849] warning: Symbol file /Users/johnw/Library/Developer/CoreSimulator/Devices/316F5DE3-0617-402B-AFC8-933452456F42/data/Containers/Bundle/Application/E2218027-0EFF-4EE4-9BAE-A30F0A363A5C/ doesn't match image (null)

    That DLL is the one for my PCL. It's like it's not getting updated on the emulator, even after a clean and rebuild. However, as soon as I delete the app from the emulator and redeploy, it reappears immediately. I've checked that it's being recreated every time by checking the build log (it is).

    All sorts of stuff seems to have broken since yesterday's update to xamarin ios 10, monotouch, etc.
    I've seen a couple of posts that say rebooting my mac may fix it.

    I'm about to try rebooting now.

  • JohnWilsonJohnWilson USMember
    edited May 2015

    So, rebooting didn't work. However it doesn't give the warning about that symbol file not matching the image any more.

    Breakpoints inside the .iOS project are hit, breakpoints inside the PCL are not.

    Are all the Xamarin guys at the //build conference, perhaps? Is that why there's been little to no support the past couple of days? Why am I paying for a Business subscription again?

  • HalldorFjalldal.1513HalldorFjalldal.1513 ISMember
    edited May 2015

    I ended up downgrading, so debugging is working again, finally :)

    Downgrade instructions from here:

  • NealCulinerNealCuliner USBeta ✭✭✭

    Sadly - debugging issues here too. I put a breakpoint, it will stop on the breakpoint but about 5 seconds later it just crashes out.

    Can someone please bump this stable release back to the beta channel? Things were going so good and just took such a huge turn back to 1999 again!

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Same here. Unable to debug any of my code!

    Please Fix ASAP!

  • VeYroNVeYroN PTMember ✭✭

    Well, I said in my last comment that the problem was solved after creating a new project and copy all resources from the old project. Turns out that it worked for some time but the problem came back...

    BUT, I think i found my problem: I had xamarin forms installed (and i need it because i need a stacklayout inside a listview footer). I've downgraded to and all works fine now! :)

    Hope this helps!

  • ParagraphDevsParagraphDevs ATMember ✭✭

    My solution is to clean the solution and rebuild it. Magically all breakpoints are hitten.

  • MayFlowerMayFlower USUniversity ✭✭

    I fixed the issue by roll back Xamarin Version 3.9.547; The version released April 29 cannot work well with my VS 2013 professional update 4, breakpoints cannot be hit; I reproduced the issue in another laptop; After I rolled back to 3.9.547, breakpoints are happy now

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    There are a couple of public bug reports currently about debugging issues with iOS for Visual Studio. See:

    There is a workaround to try in comment 7 of bug 29628. Please let us know if the bugs seem similar to your scenarios and if the noted workaround works to resolve it.

    And there is a 3rd private internal report about debugging issues that is noted as having been fixed and the fix should be released in the upcoming service release.

  • ArmandCharbonnierArmandCharbonnier FRMember ✭✭

    Hello guys,

    I'm having the same issue, worked fine until today. I'm working on a Xamarin.Forms App, using Android and i can't hit any break point in my PCL.

    I tried a lot of stuffs, clean / rebuild all, changing settings but the only thing that worked was to restart my computer. Until it's not working again....

    I got this issue either on VS 2013 Pro or Xamarin Studio, and i'm on Windows 8.

    I hope the Xamarin Team will fix it soon because it's difficult to work without debugger...

  • Cameron.3383Cameron.3383 USMember

    Guys, I was having the same issue and seem to have fixed it using the workaround stated above by Jon in comment 7 of bug 29628. I did find however that it was trying to copy the pdb files of standard libraries which I didn't have so I added a small change to the MSBuild change to stop it from trying to copy files which did not exist. Change is below (Added the Exists to the last line.):

            <Copy SourceFiles="@(_Assemblies -> '%(FullPath).mdb')"
                Condition="'%(_Assemblies.ResolvedFrom)' != '{TargetFrameworkDirectory}' And '%(_Assemblies.ResolvedFrom)' != 'ImplicitlyExpandDesignTimeFacades' And '%(_Assemblies.FrameworkFile)' != 'true' And Exists('%(_Assemblies.FullPath).mdb')" />
  • SmathsSmaths USMember ✭✭

    I saw this "solution" posted in another thread that solved the issue for the time being:

    Remove all breakpoints > Rebuild And Clean

    After doing that, the breakpoints were hitting. Hope that helps anyone dealing with this issue.

  • SmathsSmaths USMember ✭✭
    edited May 2015

    Update: The solution I mention above is temporary as I'm running into the same issue several hours later.

  • GeorgeCookGeorgeCook PEUniversity ✭✭✭

    where do I put the copy task? in a csproject file? which one? all of them in my project?

  • masahikomiyasakamasahikomiyasaka JPMember ✭✭

    I encountered same problem.
    Today I upgraded to stable latest 3.11.x. After some debugging I noticed break point doesn't hit. During that VS freezed several times like deadlock or something happens.
    I downgraded to 3.9.547. Break point didn't hit still. I cleaned and rebuilded. Now break point hit properly.

  • TimFTimF USMember ✭✭

    I've been having the same problem.

    I've tried rebooting, etc, but didn't seem to help.

    I just tried going into my project folder, and deleting the obj and bin folders in my projects. Did a rebuild and they are working again.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Confirm that adding the copy mdb workaround above worked for me.

  • TimFTimF USMember ✭✭

    Is anybody having this problem on Android? The bug listed above says that this problem is fixed on Android, but I am getting it reliably. The workaround above I believe only works for iOS. I've tried something similar in Xamarin.Android.Common.Target but I'm not sure entirely how to fix it, without spending all day studying the build files.

  • MannieMannie NLMember

    Is anyone at Xamarin working on this issue at all? It has been reported more than a month ago, and this a pretty annoying bug still.

  • Adam.HillAdam.Hill USMember

    Confirming the Task from Comment #7 works in iOS

  • SupreetTare.9314SupreetTare.9314 GBUniversity ✭✭

    The comment 7 workaround works intermittently & also produces some other issues.
    After implementing the workaround if you make any changes in the IOS project & then try to rebuild you get tons of errors saying mdb files could not copy.
    This is a major issue & I do not understand how Xamarin releases their stable builds without testing such important aspects of the framework.
    A fix is urgently needed for this.

  • jonathanyatesjonathanyates GBMember ✭✭✭
    edited May 2015

    The workaround works until you do an update for the latest stable X.iOS, then the workaround gets overwritten and breakpoints don't get hit again. I really can't believe that Xamarin have released another update without fixing this issue. I therefore have to reapply the workaround.

  • VeYroNVeYroN PTMember ✭✭

    @jonathanyates what version of xamarin forms do you have?

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Latest (Un)Stable.

  • LuisMarquesLuisMarques GBMember, University ✭✭
    edited May 2015

    Hi, I'm also experiencing the break points not being hit with both iOS and android. On windows phone they work absolutely perfect. So I'm going to try downgrading my xamarin version. Is it xamarin forms I need to downgrade or the xamarin sdk for visual studio? I never downgraded previously so hope I don't make it worse later! Will backup the project before doing this...

    Xamarin - as many others have said in this thread - please fix this urgently. Debugging the old fashioned way with log files is slow and painful. Productivity goes down the drain :-(

    I'm on visual studio 2013 professional using the lates version of xamarin forms and xamarin sdk for visual studio. This forms pcl project has the 3 sub project types for each platform.

  • NMackayNMackay GBInsider, University mod


    They have repo projects and they have certainly identified the issue we were having, debug statements not firing in PCL's. You can get round it in iOS by deleting the build machine cache and obj & bin folders on your VS2013 machine but that gets very slow very quickly, the current Alpha release does not solve the breakpoint issue with PCL's in Android. Hopefully we'll get a stable build soon without regression bugs.

  • LuisMarquesLuisMarques GBMember, University ✭✭

    I managed to get this sorted by downgrading to the previous version as some others stated. All breakpoints are working now. I wont upgrade until I see this fixed...

    @NMackay try downgrading, you will see it works! :)

  • NMackayNMackay GBInsider, University mod


    Thanks. This was suggested to me but I upgraded in the 1st place due to instability in the link to the iOS build machine, also that build always forgets the iOS linker settings which was a pain. Until 3.9 it was pretty stable.

    I'm sure they'll nail the next release :sweat_smile:

  • EdElliott.3788EdElliott.3788 USMember

    I second André Gonçalves suggestion to downgrade Xamarin.Forms from the -pre version if you have it to a regular stable version. I'm on and debugging seems to be restored.

Sign In or Register to comment.