Xamarin Debugger not hitting the breakpoints

1235

Answers

  • NinineaNininea ✭✭✭ USUniversity ✭✭✭

    I have the same problem in android :( but I'm able to debug IOS . Any solution?

  • swizzyswizzy ✭✭ CHMember ✭✭
    edited May 2017

    Breakpoints not work in the actual stable version in visual studio 2015 and alpha version with Visual studio 2017 Preview
    All this solutions in this topic not work for me

    Please fix it. Debugging without breakpoints is terrible...

  • GaryCuevasGaryCuevas ✭✭ USMember ✭✭

    @HaggaiShapira said:
    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.

    That fixed it for me - you 'da MAN!

  • EricKinoshitaEricKinoshita ✭✭ BRMember ✭✭

    @HaggaiShapira said:
    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.

    My breakpoints were not being hit when debugging an Android app on Visual Studio Community 2017 for Mac. @HaggaiShapira solution worked like a charm. I only had to run Clean All to build using the new setting.

  • swizzyswizzy ✭✭ CHMember ✭✭

    Can someone help me?
    My Project has so far been developed with visual studio 2015. After an update of Xamarin, the breakpoints no longer work. I downgraded the xamarin back to the original version. No effect, breakpoint still does not work. When I open the project in Xamarinstudio, the breakpoints work. When I create a new project with visual studio 2015, the breakpoints work. I've already tried all workarounds, but so far nothing has helped. Does anyone have another idea of what could be?

  • Ben.8645Ben.8645 ✭✭ USMember ✭✭
    edited May 2017

    I had the same breakpoint problem as others are describing. Looks like they have released a new stable build 15.2.2 ( https://releases.xamarin.com/stable-release-15-2-2/ ) that addresses this problem.

    • Breakpoint is not hitting in iOS real device in iOS project via Xamarin Forms project.(4.5.0.475)
    • Breakpoint not getting hit when app is deployed in debug mode in iOS Device.(4.5.0.341)

    I'll update this post when the install is complete.

  • TomaszKruczkowskiTomaszKruczkowski PLMember

    I had the same problem with iOS debuging.
    I changed linker behavior to don't link, and that worked forr me :)

  • AnatoliiBAnatoliiB ✭✭ USUniversity ✭✭

    Do you know if this release fixes the "build failed, max retry count reached, dll used by another process" ?

    @Ben.8645 said:
    I had the same breakpoint problem as others are describing. Looks like they have released a new stable build 15.2.2 ( https://releases.xamarin.com/stable-release-15-2-2/ ) that addresses this problem.

    • Breakpoint is not hitting in iOS real device in iOS project via Xamarin Forms project.(4.5.0.475)
    • Breakpoint not getting hit when app is deployed in debug mode in iOS Device.(4.5.0.341) I'll update this post when the install is complete.
  • ts-briants-brian USMember

    Xamarin Android: 15-2-2 has not resolved this issue for me. Breakpoints are not hit. "Step Into" launches the app without debugging.

  • Ben.8645Ben.8645 ✭✭ USMember ✭✭

    After the update, in Visual Studio 2015 breakpoints still did not work. I installed Visual Studio 2017 Community and tried my solution there and they still wouldn't it. I ended up updating Xcode on my Mac agent. After the Xcode update, I ran Xcode and it ran some installs. Then I change my project properties Linker Behaviour to Don't Link(it will tell you during build to update Xcode if needed), now breakpoints work in VS2015 and VS2017.

  • Ben.8645Ben.8645 ✭✭ USMember ✭✭

    @AnatoliiB said:
    Do you know if this release fixes the "build failed, max retry count reached, dll used by another process" ?

    @Ben.8645 said:
    I had the same breakpoint problem as others are describing. Looks like they have released a new stable build 15.2.2 ( https://releases.xamarin.com/stable-release-15-2-2/ ) that addresses this problem.

    • Breakpoint is not hitting in iOS real device in iOS project via Xamarin Forms project.(4.5.0.475)
    • Breakpoint not getting hit when app is deployed in debug mode in iOS Device.(4.5.0.341) I'll update this post when the install is complete.

    I haven't ran into that error with this release. But try opening up your task manager and killing any MSBuild.exe processes and try again. I find that sometimes my Visual Studio doesn't properly end the MSBuild process and I wind up with >5 running.

  • rmaciasrmacias ✭✭✭✭✭ USBeta, University ✭✭✭✭✭

    @HaggaiShapira said:
    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.

    This worked for me as well. In addition, I had to restart Xamarin Studio for the changes to take effect.

  • AnatoliiBAnatoliiB ✭✭ USUniversity ✭✭

    @Ben.8645 said:

    @AnatoliiB said:
    Do you know if this release fixes the "build failed, max retry count reached, dll used by another process" ?

    @Ben.8645 said:
    I had the same breakpoint problem as others are describing. Looks like they have released a new stable build 15.2.2 ( https://releases.xamarin.com/stable-release-15-2-2/ ) that addresses this problem.

    • Breakpoint is not hitting in iOS real device in iOS project via Xamarin Forms project.(4.5.0.475)
    • Breakpoint not getting hit when app is deployed in debug mode in iOS Device.(4.5.0.341) I'll update this post when the install is complete.

    I haven't ran into that error with this release. But try opening up your task manager and killing any MSBuild.exe processes and try again. I find that sometimes my Visual Studio doesn't properly end the MSBuild process and I wind up with >5 running.

    yeah killing msbuild was a temp fix until need to build again. sometime it would build once and then get stuck with the error. here is the reference to the bug: https://bugzilla.xamarin.com/show_bug.cgi?id=56275
    it's fixed in the latest 5/24/2017 xamarin update.

  • ts-briants-brian USMember

    @HaggaiShapira said:
    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.

    Where is "Project > Active Runtime" in VS2015 Xamarin Android project?

  • ts-briants-brian USMember

    @ts-brian said:
    Xamarin Android: 15-2-2 has not resolved this issue for me. Breakpoints are not hit. "Step Into" launches the app without debugging.

    RESOLVED. There was an '@' in the project path, apparently VS (or some other component) doesn't like some non-alpha-numeric characters in the path.

  • DanielGivoniDanielGivoni ILMember

    @HaggaiShapira

    @HaggaiShapira said:
    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.

    thanx you saved me a day, you are a cannon!!

  • bulgrozbulgroz ✭✭ FRMember ✭✭
    edited May 2017

    I'm facing the same issue, trying to debug an ios app on an iPhone 5c running ios9.

    I made a clean windows 10 install, followed by a clean Visual Studio Community 2017 install.
    Xamarin.Forms on my iOS project is up to date.

    My mac agent is running elCapitan, up to date, with xcode up to date too.

    I tried uninstalling Xamarin Studio on the mac for the newer Visual Studio for Mac, but it didn't change anything... No breakpoint hit...

    I don't have any special char in my project path. I even tried a new wizard generated project in c:\temp: no luck...
    @HaggaiShapira , where do you find Project > Active Runtime? Thanks.

  • swizzyswizzy ✭✭ CHMember ✭✭
    edited May 2017

    I have found this error in the log:
    Xamarin.VisualStudio.IOS.Messaging.MacServer|Warning|0|There is a mismatch between the installed Xamarin.iOS (version 10.10.0.36) on the Mac XXX.XXX.XX.XXX(XXX.XXX.XX.XXX) and the local Xamarin.iOS (version 10.10.0.35). While this may not be an issue, it might cause unexpected behaviors. When applying updates, make sure to keep both the Mac and Windows in sync.

    I have the newest stable version of Xamarin ios on visual studio(no updates left) and on the mac the same.

    Any ideas?

  • JoshMcKeeJoshMcKee USMember

    One thing that I did that is kind of working, but not consistently is, ... in Options => Xamarin =>Android Section

    Under Emulator / Device Debugging

    try checking the box that says "Provide debug symbols for shared runtime and base class libraries" maybe it will at least partially work for others too

  • swizzyswizzy ✭✭ CHMember ✭✭

    Thanks to this post I could solve the breakpoint problem:
    https://forums.xamarin.com/discussion/96377/storyboard-broken-in-latest-update

    I Downgrade the xcode to 8.2.1 and the xamarin ios versions described in the linked-article.
    Now breakpoints work.

    I think there is a problem when you started a project with the xcodeversion 8.2.1 and later updates with xcode version 8.3

  • michaelwarnesmichaelwarnes ✭✭ USMember ✭✭
    edited June 2017

    @BenLevy.4265 you didn't follow up your post, just reposting a stated "fix" as an answer doesn't really help, I'm still having this problem and I have the latest version which should include the fix. Did this actually work for you?

  • michaelwarnesmichaelwarnes ✭✭ USMember ✭✭

    @TomaszKruczkowski said:
    I had the same problem with iOS debuging.
    I changed linker behavior to don't link, and that worked forr me :)

    did you get this working, you changed it to "don't link", are you sure?

  • michaelwarnesmichaelwarnes ✭✭ USMember ✭✭
    edited June 2017

    I tried looking in a mirror and saying Xamarin backwards 3 times at midnight...no luck :-(, although I'm pretty sure I heard a ghosty voice saying..."try going native.."

  • TomaszKruczkowskiTomaszKruczkowski PLMember

    @michaelwarnes said:

    @TomaszKruczkowski said:
    I had the same problem with iOS debuging.
    I changed linker behavior to don't link, and that worked forr me :)

    did you get this working, you changed it to "don't link", are you sure?

    Yeah, I'm sure, after clean build my breakpoints could be hit (Visual Studio 2015 U3). I really don't know why but it works. You could give it a try, you risk nothing.

  • michaelwarnesmichaelwarnes ✭✭ USMember ✭✭
    edited June 2017

    @TomaszKruczkowski many thanks, this has worked for me, although it was already set to "don't link", so I set it to "link" and tried to run it, and everything fell over in a heap. So I restarted VS2017 a couple of times, said a few hail marys, and then set it back to "don't link" and guess what....it worked!!!, although I was playing cheesey 70s music at the time...I wonder if that had any effect.

    But hey, thx for taking the time to post your solution....

  • JeffGonzalesJeffGonzales ✭✭ USMember ✭✭

    What 70s music isn't cheesy?

  • AlexBrown.5520AlexBrown.5520 GBMember

    I was trying to debug an iOS project, and couldn't hit breakpoints so found this thread. Our Xamarin Forms project was a dependency for the iOS and we also have an Android project that wasn't building. I fixed the build on the Android app and the debug stops were hit in iOS. I guess the build order has something to do with it, I hope this helps someone save time with this issue.

  • Oracle22Oracle22 ✭✭ USMember ✭✭

    I have resolve

    Copy file .mdb folder iPhoneSimulator
    Paste file .mdb in folder iPhone

  • bulgrozbulgroz ✭✭ FRMember ✭✭

    I solved the issue by reverting to visual studio 2015.
    Same solution, same mac build agent, working now nicely... I couldn't get it to work with visual studio 2017... :\

  • RaymondKellyRaymondKelly ✭✭✭ USMember ✭✭✭

    Same issue. Breakpoints no longer working for iOS in VS2017 after I updated VS to the latest version.

  • MaitreFouMaitreFou ✭✭ REMember ✭✭

    Hi,
    it finally works for me on VS 2017 (v15.2, everything updated) when :

    • there is no space or any special caracter in project path : "D:\Dropbox (work)\B- Benjamin\Projets_Xamarin\RshpTest" doesn't work, whereas "D:\temp\RshpTest" does.
    • delete *.user files
    • delete bin & obj of every sub-projects of my solution
    • on project properties / android options : checked "use shared runtime", checked "fast deploy", checked "enable developer instrumentation", and ".Net (Xamarin)" is selected.
    • "clean" the solution,
    • and let's go!
  • ManInTheLoftManInTheLoft ✭✭ GBBeta, University ✭✭

    Breakpoints just didn't work within a Forms App code behind file when executed against an Android device but weirdly okay on an iOS simulator.

    I exited the solution and deleted EVERY bin and obj folder. Executing on iOS simulator and Android device with no problems now.

    MITL

  • KeithAxline.3243KeithAxline.3243 USMember

    This is silly but it had me logging to the console for weeks: Somehow my Forms project setting Debug information randomly got set to None. I was checking that setting on my iOS project and thought I'd checked my Forms one as well.

    Not sure why that changed in between builds where very little code had changed. So many hours wasted.

  • HemalathaMarikumarHemalathaMarikumar ✭✭ USMember ✭✭
    edited July 2017

    Same problem with Xamarin.Forms Android platform only. While running the same project with Xamarin.Forms iOS, breakpoints work.

  • BenoistLUGNIERBenoistLUGNIER ✭✭ FRMember ✭✭

    Hi,
    The problem for me was the breakpoints was hits in Android code but not in PCL.

    At the end, I found that the Debugging information of the PCL (PCL properties -> Build -> advanced button) was at "portable". I put il back to "full" and the breakpoint hit came back.

    Hope this helps

  • PaulSinnemaPaulSinnema ✭✭ NLMember ✭✭

    Support on this subject is just terrible. As a matter of fact. Developing with Xamarin is so unstable and buggy at the moment that progress has gone down to a crawl. Losing connection to Mac. Visual Studio freezing up. VS hang on solution load (google-services.json again!), Builds are incomplete on Android after changes in PCL, and this breakpoint thing in PCL, flawed designers, the list goes on and on...

  • PaulSinnemaPaulSinnema ✭✭ NLMember ✭✭

    The problem is even worse. Exceptions in PCL are no longer shown from iOS code. Had to start the Android project just to find an error in my PCL code.

  • Thibault_VellicusThibault_Vellicus ✭✭ CHUniversity ✭✭
    edited August 2017

    Switching to "Beta" channel fixed the problem for me (https://stackoverflow.com/questions/44015510/xamarin-forms-ios-breakpoints-not-hit)

    Totally agree with @PaulSinnema

    @PaulSinnema said:
    Support on this subject is just terrible. As a matter of fact. Developing with Xamarin is so unstable and buggy at the moment that progress has gone down to a crawl. Losing connection to Mac. Visual Studio freezing up. VS hang on solution load (google-services.json again!), Builds are incomplete on Android after changes in PCL, and this breakpoint thing in PCL, flawed designers, the list goes on and on...

  • RonnieCyrierRonnieCyrier ✭✭ USMember ✭✭

    @Ben.8645 said:
    After the update, in Visual Studio 2015 breakpoints still did not work. I installed Visual Studio 2017 Community and tried my solution there and they still wouldn't it. I ended up updating Xcode on my Mac agent. After the Xcode update, I ran Xcode and it ran some installs. Then I change my project properties Linker Behaviour to Don't Link(it will tell you during build to update Xcode if needed), now breakpoints work in VS2015 and VS2017.

    This worked for me! Thanks

  • pirati02pirati02 ✭✭ USMember ✭✭

    I had same problem, but checkboxes was unckecked

Sign In or Register to comment.