Breakpoints not working

DavidDancyDavidDancy AUMember ✭✭✭✭

Does anyone have any magic tricks that will get breakpoints working again please? Mine have stopped since updating to the latest stable version of Xamarin Studio + associated libraries.

XS is 6.1.4 b1
Xam Android is 7.0.2.42
Xam iOS is 10.3.1.8

This is really quite fundamental to the usefulness of an IDE and very annoying when it's not working.

Posts

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

    @DavidDancy

    Were you able to resolve this issue? If not, did you make sure to clean your solution after doing the update? Are you unable to hit breakpoints even in a new solution from template?

    Also to see if we can reproduce the issue it would be helpful to get your full version info (Xamarin Studio->About Xamarin Studio->Sow Details->Copy Information) and also some steps to reproduce the issue would be helpful, IOW what type of solution are you having this issue in, a Xamarin.Forms solution, Xam.Android, or Xam.iOS project?

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @JGoldberger this is a problem I have periodically with one of my Xamarin installations (I have 3, all Community Edition for experimenting at home, all on Macs with all the latest bits installed). The problematic one has been switched multiple times from Stable to Beta to Alpha and back again.

    Right now I'm running Alpha channel with the latest everything so I get the same Mono installed for both Xamarin Studio and Visual Studio for Mac. I find that breakpoints in normal code work OK, but breakpoints in async code are often skipped or ignored, and the IDE does not resume debugging on the line immediately after a breakpoint in async code.

    Curiously, on one of my other installations, I have ostensibly the exact same Xamarin Studio running (Alpha, with all the latest bits, and parallel installation of Visual Studio for Mac) but that appears to work OK. So the problem may well be some historical bits of the install on the one that's not working.

    Needless to say this is frustrating and nearly impossible to troubleshoot. I asked a long time ago for consideration to be given to separating out the channels of Xamarin Studio into distinct apps with their own preference and settings so this kind of issue could be avoided altogether, but I've not seen any moves in that direction. As it is I'm beginning to think I might need to nuke the whole computer and reinstall everything.

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

    @DavidDancy

    I am sorry to hear about these frustrations. It does sound like an uninstall/reinstall might be in order. You can try just uninstalling the Xamarin bits and reinstalling before you nuke and reinstall everything. Here is our guide on doing a complete uninstall of Xamarin:
    https://developer.xamarin.com/guides/cross-platform/getting_started/installation/uninstalling_xamarin/

    Since VS for Mac is in preview, there is a decent chance that changing the update channel might not work as expected with VS for Mac installed. I change update channels all the time with Xamarin Studio, before VS for Mac was installed on my system, and never had any issues as a result. Since I have installed VS for Mac I have stayed on the Alpha channel, but I will experiment to see if I can reproduce the described issue. Thanks for the extra info on what is happening.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @JGoldberger Well, I did the full re-install treatment from the link you provided (thanks btw).

    I now have the absolute latest Xamarin / Studio installation, running the Alpha channel.

    Sorry to report I've got exactly the same problem as before.

    I'm using the New Project template to set up a Prism Forms app. The template has one or two trivial problems, but once they are fixed I can compile and deploy the new app to a simulator. But my breakpoints don't catch. I don't think it's anything to do with Prism itself, since the previous version of Xamarin worked just fine. This one is not playing ball.

    All the details here:

    === Xamarin Studio Community ===

    Version 6.2 (build 1798)
    Installation UUID: f148d995-5b1c-4e19-90c3-a54e5c750f77
    Runtime:
    Mono 4.8.0 (mono-4.8.0-branch/084f912) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 408000478
    

    === NuGet ===

    Version: 3.5.0.0

    === Xamarin.Profiler ===

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

    === Apple Developer Tools ===

    Xcode 8.2 (11766)
    Build 8C38

    === Xamarin.iOS ===

    Version: 10.4.0.97 (Xamarin Studio Community)
    Hash: 2bcf787
    Branch: cycle9
    Build date: 2017-01-25 12:40:52-0500

    === Xamarin.Android ===

    Version: 7.0.2.42 (Xamarin Studio Community)
    Android SDK: /Users/davidd/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
    2.3 (API level 10)
    4.0.3 (API level 15)
    4.1 (API level 16)
    4.2 (API level 17)
    4.3 (API level 18)
    4.4 (API level 19)
    5.0 (API level 21)
    5.1 (API level 22)
    6.0 (API level 23)
    7.0 (API level 24)

    SDK Tools Version: 25.2.3
    SDK Platform Tools Version: 25.0.1
    SDK Build Tools Version: 25.0.1

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

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

    === Xamarin Android Player ===

    Version: 0.6.5
    Location: /Applications/Xamarin Android Player.app

    === Xamarin Inspector ===

    Version: 1.0.0.0
    Hash: 1f3067d
    Branch: master
    Build date: Tue, 15 Nov 2016 21:13:59 GMT

    === Xamarin.Mac ===

    Version: 3.0.0.367 (Xamarin Studio Community)

    === Build Information ===

    Release ID: 602001798
    Git revision: 79fea1cb975eace20d5316687ebb9ff687b51451
    Build date: 2017-01-27 07:34:26-05
    Xamarin addins: 8e37b5263f1583e25ed2eda77f84829dfcf42759
    Build lane: monodevelop-lion-cycle9

    === Operating System ===

    Mac OS X 10.12.3
    Darwin macbookpro-4.local 16.4.0 Darwin Kernel Version 16.4.0
    Thu Dec 22 22:53:21 PST 2016
    root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

    === Enabled user installed addins ===

    Android Signature Tool 1.0.1
    MFractor.Installer 2.2.0
    MFractor 2.07.02
    MvvmCross Template pack 1.2.6
    Addin Maker 1.3.2
    MSBuild Editor 1.1.2
    Paket 0.3
    xUnit.NET 2 testing framework support 0.6.13
    Prism Template Pack 1.5
    JSON Copy 1.1
    SpecFlow Support 1.9.1.0
    XamlStyler 1.0.3
    Manifest.addin 0.0.0.0

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited February 2017

    Do you have the same issue with a non-Prism Forms template app?

    Did you create a Prism app with a PCL or Shared project for the core code? Can you provide specific steps to reproduce, i.e. where you are placing breakpoints? You said it is with async methods, so can you either provide a test project that demonstrates the issue using an async method?

    I just created a new Prism Forms PCL project, fixed the issue with the template, added an async method to do a web request, and placed breakpoints in the App project startup code (AppDelegate.FinishedLaunching for iOS), in the OnNavigatedTo method in the template MainPageViewModel, and in the code behind for the MainPage. I added a button to launch an async method to make a web request, and place breakpoints in the button click handler and in the async method. All breakpoints were hit. Since I could not reproduce, a test project that demonstrates the issue would be most helpful.

    I have attached my simple test project here. Perhaps see if this works on your end as well, and if not then it would still seem to be some environment issue. I am on all the same versions as you, with one exception... I am on XCode 8.2.1 while you show XCode 8.2.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    OK, this is bizarre. After leaving the computer alone overnight, when I opened up the project while commuting on the train this morning it worked. But now Intellisense is foobar. Compiling works; even the Forms preview appears to work. But from past experience I've found that Intellisense only works if XS has a network connection when it starts. There seems to be something in the startup flow that fails to get going if the network isn't available.

    So I've gone up a ladder and slid straight back down a snake.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @JGoldberger more info: I think the problem also involves the licence checking system. This has been an issue for a very long time and causes no end of grief as I move my laptop between connected and disconnected scenarios, or between WiFi and LAN.

    The licence checker, frankly, is very poor code that does not respond well to changes in the network. I regularly have to re-register my XS because the licence checker has kicked in. AFAICT it actually deletes the registered licence before checking to see if it can find the server to ask it about your current licence.

    This is a terrible way to implement a licence check, and often results in the registered licence disappearing from the computer - which seems to have knock-on effects on Intellisense and a host of other subsystems of the IDE.

    The whole thing has the smell of an unhandled exception about it. Possibly several unhandled exceptions!

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited February 2017

    Hey @DavidDancy

    Thanks for the info. I think the best option here would be to file a bug report. Please provide your version info and IDE logs for the bug report as well as the best description you can provide of how to reproduce the issues. This might in fact need two bug reports, one about the breakpoints not hitting, and another about intellisense and the licensing/network connection issue (since they seem to be related).

    Bugs can be filed at:
    bugzilla.xamarin.com/newbug
    Here are the guidelines for filing a bug report: https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html
    You will have to create an account on that system if you have not already done so. There is a check box above the Submit button to set the bug as private.

    Ping me here or add me to the cc list (start entering my name and I should show up in the auto complete list) so I can bring it to the attention of the engineering team.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @JGoldberger I will do that and enclose all my log files for the last few days since the reinstall.

    I used my desktop installation over the weekend and found to my consternation that it suffers some similar problems. I worked for about an hour, and then all of a sudden XS stopped talking to the simulator. Looking in the logs I find that there is an unhandled exception just before it all goes foobar. Restarting XS was the only way to get it working again.

    Transferring projects between computers using git is also much less reliable than I need it to be. I created a brand-new project on the desktop, got it working, pushed it to BitBucket, and copied it down to the laptop from there. On opening it on the laptop I find a) packages didn't restore b) when I restored manually there were a bunch of broken references that I had to edit by hand in the .csproj file.

    I realise this is way off-topic from the original post, but since it's my thread I'll indulge myself :smile: .

    The only reason I went to the Alpha edition was to be able to take advantage of the Prism templates. They don't seem to be available for the Stable version.

    What would be completely superb though would be to have a preferences folder somewhere that contains templates that I can customise, that don't get wiped out between version upgrades. I have my own way of doing things and the stock templates don't quite fit what I need. (The Prism templates have bugs too that need to be fixed in every new app you create with them.)

  • BrianLagunasBrianLagunas USInsider ✭✭✭✭

    @DavidDancy Some bugs have been found and fixed in the templates (missing using statements). The update just hasn't been released yet. Also, if you find bugs in the templates, your community would greatly appreciate it if you reported them or better yet submitted a quick PR to fix them :)

    Submit issues here: https://github.com/PrismLibrary/Prism-Extensibility

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @BrianLagunas fully agree. No report == temporarily too busy watching all-consuming American sports festival. :smile:

Sign In or Register to comment.