Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Debugging own private nuget packages

Hi

We've created some nuget packages for some shared mobile infrastructure and package these as private nuget packages that we host on our own local nuget feed. These nuget packages include the pdb files that we created when doing the release compile. It seems that for every pdb, Xamarin creates a mdb file for the Xamarin Debugger. These are all available in the apk deployed onto the device.

When debugging an app using Visual Studio 2015 and latest Xamarin 4 we are however unable to step into the source code associated with our own nuget package. Why is this not possible seeing that the mdb and pdb files for all our local nuget package assemblies are available? I'm guessing that it is not able to load the symbols? I know that you are able in .NET full framework to make use of a symbol server to download symbols, but this does not seem the case when using Xamarin Debugger in Visual Studio?

Posts

  • CarelLotzCarelLotz ZAMember ✭✭

    Just a further observation on the topic. I'm able to step into the source code of the private nuget packages within the Test projects that run under the .NET Framework 4.5 when I debug them using the test runner (R#). I assume because the test runner is using the normal VS .NET debugger. However, I'm not able to step into the same source code when I'm debugging from within the Android project which I assume is using the Xamarin Debugger in VS.

  • SteveHurdSteveHurd USMember

    I also noticed recently that debugging nuget packages from our local repository wasn't working properly. In my case, deleting the mdb files, adding the actual nuget project to the same solution (but not actually adding a project reference), and redeploying at least let me hit breakpoints and step through the code. It's not ideal and I would love to hear about a better solution.

    Also using VS2015 and Xamarin 4.

  • CarelLotzCarelLotz ZAMember ✭✭

    I've just downgraded to Xamarin 3.11.1594.0 and I can also confirm that I am then able to successfully step into the source code of the private nuget package. So this seems like something that has been broken with Xamarin 4 update. @BrendanZagaeski

  • CarelLotzCarelLotz ZAMember ✭✭

    Filed a bug

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited April 2017

    Many thanks for the bug report. I will now close this thread to consolidate any further discussion and updates onto that report: Bug 36576. Feel free to post any further findings about improved or more detailed workarounds on the bug report to make them visible to other users. (Note: Bug 36576 is currently marked as a duplicate of a private bug, so feel free to add any new comments directly on Bug 36576.)


    (As always, I'm also happy to reopen the thread upon request within the next month or two. Just send a quick email to [email protected] with a link to this thread. For follow-up after the next couple of months, if the remaining related open bug reports or forum threads do not cover the desired scenario, please follow the recommendations to create a new bug report, forum thread, or Stack Overflow question. Thanks!)

This discussion has been closed.