Xamarin Debugger not hitting the breakpoints

1246

Answers

  • EmilsJonansEmilsJonans ✭✭ USMember ✭✭

    Same problem and only with some devices! Breakpoints work on my tablet, but as I need to fix a crash on phone(LG G2 Mini) I can't do that because the breakpoints are not working! I hate to log a lot of sh*t out and then figure out where the f the app breaks!

    I NEED BREAKPOINTS THAT WORK ON ALL DEVICES!

    I am now thinking that I would have build the app already if there wasn't issues with the Xamarin all the time(like after every update)!

  • ChrisColeTechChrisColeTech ✭✭✭ USMember ✭✭✭

    Break points still not working.

  • ChrisColeTechChrisColeTech ✭✭✭ USMember ✭✭✭

    @bartdk said:
    Did a reinstall of my machine a couple of days ago with all the latest installers available.
    Still having the issue of not hitting certain breakpoints.

    Anyone in the xamarin team working on this issue ? Rather anoying :(

    Of course no one at xamarin is actually working on bug fixes.

    They're too busy not working on bug fixes to actually work on bug fixes.

    Typical response is "go file a bug report"..

    But I digress..

    A work around is to close VS, delete the .suo file and try again.

    Just worked for me.

  • Nathan.0614Nathan.0614 ✭✭ USUniversity ✭✭

    Still an issue, still none of the fixes/workarounds work for me.

  • MaitreFouMaitreFou ✭✭ REMember ✭✭

    @Nathan.0614 said:
    Still an issue, still none of the fixes/workarounds work for me.

    same for me, it looks like it works for 5 minutes, then nothing...
    so I use xamarin studio 5.9.7, with xamarin.android 5.1.7. it works well on it.
    If I update : bug !

  • JaaqJaaq ✭✭ MXMember ✭✭

    Debug l iPhoneSimulator > iPhone 5s iOS 9.3(example) ??

  • Nathan.0614Nathan.0614 ✭✭ USUniversity ✭✭

    Any response from Xamarin? Definitely doesn't sound like an isolated incident.

  • ArashDavidiArashDavidi ✭✭ USMember ✭✭
    Xamarin Studio Community
    Version 6.0.2 (build 73)
    Runtime:
    Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)
    
    Package version: 404020011
    
    Apple Developer Tools
    Xcode 7.3.1 (10188.1)
    Build 7D1014
    
    Xamarin.iOS
    Version: 9.8.2.22 (Xamarin Studio Community)
    Hash: f37444a
    Branch: cycle7-sr1
    Build date: 2016-07-28 12:17:02-0400
    

    This is my setup which using for several weeks and this Problem Happened to me today out of nowhere without updating and etc...
    using my yesterday backup when BPs were okay didn't help also, so it's about xamarin itself not the project?!
    I have tried most of tricks in this topic and none of them has worked so far.
    I hope someone having my conditions could has solved this issue !

  • ShrikantMaliShrikantMali ✭✭ USMember ✭✭

    Hi All, me to facing similar problem, however in my case, I am able to debug the application but just in main assembly, as soon as the control flow down to another assembly, xamarin is not able to debug, and the call stack show grayed out.
    Need help from community - Please help, as support for xamarin is non existent.

  • NateVargheseNateVarghese ✭✭ USUniversity ✭✭

    Seriously, this is still an issue with no fix or workaround?

  • MaurusKuehneMaurusKuehne USUniversity

    Breakpoints don't work for me either. Deleting the .vs directory doesn't help...

  • ToemselToemsel ✭✭ USMember ✭✭

    I have the same problem. Nothing helps...

  • chrysklvschrysklvs USMember

    same here

  • MathMoMathMo ✭✭ USMember ✭✭

    The last time I had an issue with breakpoints was because I was calling a method that needs to be called on the main thread but I was calling it on another thread. It didn't crash or throw any exceptions.

  • Josh.1370Josh.1370 ✭✭ USMember ✭✭

    Bump!!

  • Nathan.0614Nathan.0614 ✭✭ USUniversity ✭✭
    edited October 2016

    Still an issue. Been several months now.

    I recommend everyone post their results on bugzilla; seems to get more response from Xamarin. Maybe if enough of us report it, it will get escalated.

    https://bugzilla.xamarin.com/show_bug.cgi?id=42200

  • RealPaulSchroederRealPaulSchroeder USUniversity

    One more possible solution for those struggling with this one in Xamarin Android projects:

    Make sure that "Bundle assemblies into native code" option is not checked in your Android project settings.

    Right click on the Xamarin Android project -> open the Properties window -> Choose the "Android Options" tab.

    Basically, I read in a 2015 SO post that,

    "The Xamarin debugger can only debug managed (i.e. C#) code. Breakpoints only work with the Xamarin debugger if the project being debugged is a managed project. They don't work if the project is a native app or native library. The Microsoft debugger can only debug native (i.e. C/C++) code. Breakpoints only work with the Microsoft debugger if the project being debugged is a native app or native library, or if it is attached to an already-running Android process."

    I put that information together with noticing the debugger for the Android project was "Xamarin". Unchecking the "bundle assemblies" option that someone else on my team had changed and checked into source control worked for me.

  • TomMiller.5479TomMiller.5479 USMember

    I have the same issues as everyone else, the exception is that I am not doing Android or IOS development.
    When debugging my main application or class it will hit all of the break points I set until I attempt to debug my NUnit tests. It compiles and runs the tests bypasses the break points in the unit tests however, it will break, at the break points I set in my classes or main application.

    I could run visual studio instead but my laptops are limited on resources and MonoDevelop / Xamarin loads A LOT faster.

  • ArashDavidiArashDavidi ✭✭ USMember ✭✭

    Hi all,
    This is my setup and i still can't get breakpoints to hit inside Async methods, Also the XS for macOS 10.12 is alot buggy like heck, huge bummer

    Xamarin Studio Community
    Version 6.1.1 (build 15)
    Installation UUID: e581e12f-7977-4977-97cd-e93a87456527
    Runtime:
        Mono 4.6.1 (mono-4.6.0-branch-c8sr0/abb06f1) (64-bit)
        GTK+ 2.24.23 (Raleigh theme)
    
        Package version: 406010003
    
    NuGet
    Version: 3.4.3.0
    
    Xamarin.Profiler
    Not Installed
    
    Apple Developer Tools
    Xcode 8.0 (11246)
    Build 8A218a
    
    Xamarin.Mac
    Not Installed
    
    Xamarin.Android
    Not Installed
    
    Xamarin Android Player
    Not Installed
    
    Xamarin.iOS
    Version: 10.0.1.8 (Xamarin Studio Community)
    Hash: 3983064
    Branch: cycle8-sr0-xi
    Build date: 2016-09-23 15:34:54-0400
    
    Build Information
    Release ID: 601010015
    Git revision: fa52f02641726146e2589ed86ec4097fbe101888
    Build date: 2016-09-22 08:03:02-04
    Xamarin addins: 75d65712af93d54dc39ae4c42b21dfa574859fd6
    Build lane: monodevelop-lion-cycle8-sr0
    
    Operating System
    Mac OS X 10.12.0
    Darwin A-Mac.local 16.0.0 Darwin Kernel Version 16.0.0
        Mon Aug 29 17:56:20 PDT 2016
        root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
    
  • HassanJawedHassanJawed ✭✭ USUniversity ✭✭

    @RealPaulSchroeder said:
    One more possible solution for those struggling with this one in Xamarin Android projects:

    Make sure that "Bundle assemblies into native code" option is not checked in your Android project settings.

    Right click on the Xamarin Android project -> open the Properties window -> Choose the "Android Options" tab.

    Basically, I read in a 2015 SO post that,

    "The Xamarin debugger can only debug managed (i.e. C#) code. Breakpoints only work with the Xamarin debugger if the project being debugged is a managed project. They don't work if the project is a native app or native library. > The Microsoft debugger can only debug native (i.e. C/C++) code. Breakpoints only work with the Microsoft debugger if the project being debugged is a native app or native library, or if it is attached to an already-running Android process."

    I put that information together with noticing the debugger for the Android project was "Xamarin". Unchecking the "bundle assemblies" option that someone else on my team had changed and checked into source control worked for me.

    This worked for me

  • RobHouweling.4203RobHouweling.4203 ✭✭ USMember ✭✭

    This issue was fixed for me (when debugging an app on iPhone 4s) when I disabled the option "Enable device-specific builds" for iOS. After that breakpoints were hit again.

  • v3yr0nv3yr0n ✭✭ USUniversity ✭✭

    My breakpoints only work after running the app 2 times.
    So, here's what I need to do to have breakpoints after changing 1 line of code:
    1 - run the app and wait until it starts
    2 - stop and run the app again

    I'm not sure what caused this, but it's very annoying and time wasting...

  • v3yr0nv3yr0n ✭✭ USUniversity ✭✭

    Updating to xamarin studio 6.2 from alpha channel solved the issue for me...

  • PavelSichPavelSich ✭✭ GBInsider, University ✭✭

    Guys, make also sure you have Debug Symbols enabled on the actual project. You might have it in main solution project, but do not have it in the PCL lib etc. So check there too.

  • RodrigoUzcangaRodrigoUzcanga USMember

    Next configuration works for me

    iOS Project Options -> iOS Buid-> Linker Options -> Link SDK assemblies only

  • quanHoang.0335quanHoang.0335 ✭✭ USMember ✭✭

    It's work for me follow steps:

    1. Uncheck Enable Debugging
    2. Build
    3. Re check Enable Debugging
    4. Clear all breakpoints
    5. Run on device and it's work

    Other config like image:

  • NateVargheseNateVarghese ✭✭ USUniversity ✭✭

    So, any other suggestions?

  • JedatJedat ✭✭ SIMember ✭✭
    edited April 2017

    Use "Visual Studio for Mac" (Preview at the moment but works) instead of "Xamarin Studio". This fixed the problem for me. Breakpoints are working even in my PCL projects! Another thing... I had to change "project.json" (JSON format) to "packages.config" (XML format) when changing from "Xamarin Studio" to "Visual Studio for Mac".

  • SmeSme ✭✭✭ USMember ✭✭✭
    edited May 2017

    Running VS 2017, and breakpoints suddenly stopped working in my PCL project, but the ones that are set in my iOS project are being hit. I didn't change any code, and earlier my PCL project break points were being hit. Very strange, will try to clean the project and see if that helps.

    Edit: Cleaning the entire solution fixed the issue for me. I also closed the simulator and restarted it, though I'm not sure if that had any effect.

  • 15mgm1515mgm15 ✭✭✭✭ USMember ✭✭✭✭

    Using VS for Mac works for me for some time, suddenly the devices keeps disconnecting and the debugger stops (obviously) This is on the current Alpha channel.

  • kizanlikkizanlik ✭✭ TRMember ✭✭

    Same here. Before installing the latest Xamarin Studio stable channel updates it was working. Here is the installation summary:

    Xamarin Studio Community
    Version 6.3 (build 863)
    Installation UUID: ...
    Runtime:
    Mono 5.0.0.100 (2017-02/9667aa6) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 500000100
    

    NuGet
    Version: 3.5.0.0

    Xamarin.Profiler
    Version: 1.5.4
    Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    Apple Developer Tools
    Xcode 8.0 (11246)
    Build 8A218a

    Xamarin.iOS
    Version: 10.10.0.33 (Xamarin Studio Community)
    Hash: 3e5ac5ff
    Branch: d15-2
    Build date: 2017-05-05 18:11:38-0400

    Xamarin.Android
    Version: 7.3.0.13 (Xamarin Studio Community)
    Android SDK: /Users/user/Library/Android/SDK
    Supported Android versions:
    4.4 (API level 19)
    7.1 (API level 25)

    SDK Tools Version: 25.2.5
    SDK Platform Tools Version: 25.0.5
    SDK Build Tools Version: 25.0.3

    Java SDK: /usr
    java version "1.8.0_131"
    Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL

    Xamarin.Mac
    Version: 3.4.0.33 (Xamarin Studio Community)

    Xamarin Inspector
    Not Installed

    Build Information
    Release ID: 603000863
    Git revision: a2163670efe259c85cd8f335d95b175068fbbe2a
    Build date: 2017-04-03 14:33:15-04
    Xamarin addins: 2045d688ea1420e0381b473360ca62a763eb7d04
    Build lane: monodevelop-lion-d15-1

    Operating System
    Mac OS X 10.12.4
    Darwin iMac.local 16.5.0 Darwin Kernel Version 16.5.0
    Fri Mar 3 16:52:33 PST 2017
    root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

  • mwesolowskimwesolowski ✭✭ PLMember ✭✭

    Same here.

  • ValerioSantinelliValerioSantinelli ✭✭ ITMember ✭✭

    Visual Studio Mac 7.0 Build 3146 has the same problem on my box. Breakpoints are being ignored.

  • dlopmentdlopment ✭✭ USMember ✭✭

    I just ckecked the csproj file (Visual Studio). There was a wrong platform definition:

    PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
    PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "

    And in the Xamarin project properties: x86

    I chenge AnyCPU to x86 in the csproj file. Now it's working for me.

    And the old workaround of clearing out all bins does not work.

    looks like a bug of xamarin

  • Andrew_RobertsAndrew_Roberts ✭✭ USMember ✭✭

    Same issue here. No breakpoints in PCL after updating to latest.

  • sonny_ppgsonny_ppg ✭✭ USMember, University ✭✭

    Microsoft Visual Studio Enterprise 2015
    Version 14.0.25123.00 Update 2
    Microsoft .NET Framework
    Version 4.6.01586

    Xamarin 4.5.0.443 (c871575)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android 7.3.0.13 (448f54f)
    Visual Studio extension to enable development for Xamarin.Android.

    Xamarin.iOS 10.10.0.30 (30b6e87)
    Visual Studio extension to enable development for Xamarin.iOS.


    Same here, I cant trace breakpoints in iOS and all my Android releases are running super slow seems like the runtime is affected.

  • HaggaiShapiraHaggaiShapira ✭✭ ILMember ✭✭

    I'm not sure if someone is still following this thread, but this workaround worked for me.
    The problem sometimes has to do with the mono 5.

    So the resolution is to use older version of mono:

    Set "Project > Active Runtime" to "Mono 4.8.0 (8f6d0f6) (/Library/Frameworks/Mono.framework/Versions/4.8.0)".

    for Mac users, change it in "Preferences" -> ".NET Runtimes"

    Then Rebuild the Android app project.

  • JedatJedat ✭✭ SIMember ✭✭
    edited May 2017

    @ShrikantMali said:
    Hi All, me to facing similar problem, however in my case, I am able to debug the application but just in main assembly, as soon as the control flow down to another assembly, xamarin is not able to debug, and the call stack show grayed out.
    Need help from community - Please help, as support for xamarin is non existent.

    Exactly the same here. Breakpoints work on iOS. But on Android PCL project they don't.

    Visual Studio Community 2017 for Mac
    Version 7.0 (build 3146)

    Xamarin.iOS
    Version: 10.10.0.33 (Visual Studio Community)
    Hash: 3e5ac5ff
    Branch: d15-2
    Build date: 2017-05-05 18:11:38-0400

    Xamarin.Android
    Version: 7.3.0.13 (Visual Studio Community)
    Android SDK: /Users/t/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
    7.1 (API level 25)

    SDK Tools Version: 26.0.2
    SDK Platform Tools Version: 25.0.6
    SDK Build Tools Version: 25.0.3

    Java SDK: /usr
    java version "1.8.0_101"
    Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL

    Operating System
    Mac OS X 10.12.4
    Darwin 16.5.0 Darwin Kernel Version 16.5.0
    Fri Mar 3 16:52:33 PST 2017
    root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

Sign In or Register to comment.