Breakpoints and Exceptions stopped working properly, xamarin android
Asked Answered
P

1

7

I am developing app in Xamarin Android and have a very strange problem: Breakpoints and Exceptions have stopped working properly. When I set a breakpoint it never gets hit. I have set breakpoints all over my project but none of them were hit. This happens in Visual Studio and in Xamarin Studio as well.

I also have second and more annoying problem, every time there is an exception, it throws totally unhelpful "java.lang.reflect.InvocationTargetException" exception in Xamarin Studio and "An Exception occurred" in Visual Studio, with no more details about the exception. This happens only in one particular project, other projects work fine. I have looked for the solution in various forums and blogs but none of them worked. I am pretty new to Xamarin Android development and hope you can help me.

Password answered 22/6, 2015 at 18:34 Comment(2)
That InvocationTargetException likely has an inner exception that will be more helpful in telling you specifically what failed. An invocation exception occurs when reflection is used to invoke a method directly and something from that point forward in the call stack throws an exception. Generally you'll at least get the line in which the InvocationTargetException occurred, so you will have an idea of what might be getting called. If you find that, wrap it in a try/catch and re-throw the inner exception to find the source of the problem.Banville
thank you for your fast response! Yes now I see the inner exception in xamarin studio, but what about visual studio? it only shows "An exception occured" on EVERY exception, I have tried a lot exceptions but visual studio only throws "An exception occured", also breakepoint don't get hitted, do you have any ideas what can this be caused by?Password
P
6

Possibly related too:

Bug 30318 - [Android] Windows only: Breakpoints in PCL projects do not work after cleaning solution, redeploying, and restarting debugging. Partial workaround: delete all the bin folders in the solution after cleaning.

Deleting the bin and obj folders has been fixing the issue for me, I'm on v. 3.11.586.

Pacheco answered 23/6, 2015 at 4:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.