Hi,
I'm hitting Debug - (Start Debugging) on my app in Visual Studio with my Android device connected. If it hits an error I see a page with this message:
"Frame not in module" - "The current stack frame was not found in a loaded module. Source cannot be shown for this location"
This doesn't let me step through my code and use the debugger properly. How can I get this to work?
Answers
This is probably not the same issue - but FYI I see this kind of problem debugging on iOS when I have breakpoints in async methods. I have to set a breakpoint a line above what I actually want to break on and then do a step over. Then the debugger usually finds the context.
Do you only get this issue on iOS, but Android works for you? I am having the problem when debugging on my Android device
I've tested on an iOS device and if an unhandled exception is thrown, the debugger highlights the line of code. Why is this working on iOS yet not Android?
I get this all the time it is very frustrating as I cannot debug. is there an exception setting that needs changing in visual studio? Any advice here is greatly received even if it is to use console.writeline..
Yeah I would agree I also have this problem!!
I have this problem too. I am using Xamarin Forms.
Im also having this issue in Xamarin Forms, I cant debug PCL code from my android app, when i put breakpoints on the Android Code it works, but on PCL, it doesnt. I put Debugger.Break in PCL code and the message is "debugger doesnt work, frame not in module"
Please Xamarin Team, how to fix this problem
Are you calling any .Dismiss(); in your code?
Report this via bugzilla otherwise the Xamarin team will miss it.
This issue has always been there on and off with different versions and there are a bunch of threads/bugzilla items associated with it. Try the following, some of them has worked for me in the past
AND/OR
AND/OR
Good luck
I keep getting the same error as well. I'm also using Xamarin.Forms and trying to debug an Android app. My Linking is set to None and I get the same error whether I have the Fast Deployment ticked or unticked. I asked some Xamarin University teachers and they don't know either so been asked to raise a ticket with support. I'll update you guys here if I hear anything or get this resolved.
Same problem, any solution?
Clear content from bin\Debug for PCL and Platform specific projects (droid or IOS).This will resolve your debug issue.
Just an update : I've contacted xamarin university and they started looking at this for me, but so far they just said they are not able to reproduce it and asked me to do a reinstall, apply all updates and try again.
I'm going to try this but not too hopeful. In my case, it only happens with Android and it's not specific to Xamarin.Forms, even the simplest of Android apps gives me the Frame not in module error.
frustrating!
Hi guys,
think I SOLVED IT!
Can whoever still has this problem check if on Exception Settings you have "Common Language Runtime Exceptions" ticked? Just make sure it's ticked on the parent level so all options below it are ticked too, then try again and see if it works. Please see attached screenshot. You can get to that screen by going to "DEBUG -> Exceptions..."
If it doesn't work, I have another theory and solution to try out but first I wanted to see if this solves everyone's problems.
let me know.
I worked, now tells me exactly where my mistake ... because I'll fix it
I've just tried your solution Matheus, but unfortunately it doesn't work:(
Could you tell use your theory please?
Thx!
Thanks Aneesh, that fixed the Problem.
This worked for me, but in Visual Studio 2015 you find this option under : Debug -> Windows -> Exception settings
Still having this problem, anything definitive yet?
Hi,
I am also facing this problem. My API is working in C# MVC Application well. Now I would like to use Xamarin to consume that api service.
When I call from my xamarin project as following, Error message replied that Frame not in Module.
I used Both
var response = await Client.GetAsync(actualResourceUri).ConfigureAwait(false);
OR
var response = await Client.GetAsync(actualResourceUri);
How can I solve it ? Thanks...
hi Guys,
after upgrade to the last version - the debugger stop working,., downgrade to previous version doesn't help...
any idea how to solve it?
I'm also facing the same issue in VS2015. instead starting to another activity it showing the "Frame not in module message".
if anyone have solution please post that and you can see the screenshots of Visual Studio.thank you
The same problem here, I am trying to consume my ASP.NET Web API !!
Same here. PCL in Xamarin Forms. Still experiencing the issue connecting to a Web API. It works flawlessly (no errors) in Windows, but keep getting the "frame not in module" message in Android.
For those of you looking for Android debugging, this article shows how to pull up some device logs. It's not perfect, but it helps. Essentially, go to View > Other Windows > Android Device Logging. Text mode makes it a little easier to read the stack.
http://stackoverflow.com/questions/35179513/xamarin-android-exception-causes-frame-not-in-module
Some of you have mentioned that you're experiencing issues connecting to a WebAPI with an Android project, this article got me connected immediately. The main issue is WiFi connectivity on the device, so through the device/emulator, go to Settings > WiFi > long click on Wired eth1 > Modify Network > Show Advanced Options > Change "IP Settings" to Static
https://forums.xamarin.com/discussion/56239/async-await-method-crash-web-services-response-in-android-but-same-code-work-successfully-in-other
Facing the same issue. Just started working on Xamarin. Any help/update on this?
Tried everything mentioned above. Nothing helped.
That's still happening as of the latest update (4.0.4.4) whether on Forms or blank android apps.
Xamarin, Are you guys still on this planet?
Same issue with me here but I have noticed that it only occurs inside async functions. If the code error is outside any async then the debugger correctly points to that line. I'm developing on Android.
Tried all the methods that mentioned on above but no result yet. please Xamarin save us. guys please let me know if you found any solution for this awful headache.
Same problem for all my team using VS2015.
Still no news on this?
It is really weird to see that there are no official answers/tips from Xamarin.
This issue has been reported here in Nov 2014 and we are mid-2016 now!!!
Thanks...
I am also having this issue.
Visual Studio Professional 2015 Version 14.0.25123 Update 2
Xamarin 4.1.1.3
Xamarin.Android 6.1.1.1
Xamarin.iOS 9.8.1.4
Any help would be greatly appreciated. It's causing a huge issue in my workflow because I can't easily debug.
Yes - same problem VS2015 Update 3 RC, ,forms shared 23.0.107 -> debug Android project ti device!
@WitekRadomski, @StephenWilkinson, @PaulFitzpatrick, @DaneCasserly.3718, @MichaelRead, @DanielSoto.9046, @SyedMuhammadAhmad, @DanieleDavi, @JeremyKolb, @Aneesh, @MatheusGuimaraes, @AndresCRGrecia21, @GeorgescuCatalin, @Arun90, @Yanana, @xCyborg, @alaylwint, @YosiNardea.6416, @Arvindraja, @SAIBIMajdi, @sqlt, @pramodk, @Anax, @PubuduGayan, @ChrisApers, @Hayden_Hancock (puhh... never had to "generate" such a long mention list
):
I have investigated the problem a bit more in detail...
The error-messages “frame not in module” appears every time, if VS try to investigate “foreign” code.
This, although I have set the option “Enable Just My Code” in the options to the debugger.
So... for me it’s a bug.
However, a simple workaround works for me:
In debug mode simply click on the button step over (F10) instead of “step into”
(note: this is the button on the right of the button "step over" in the upper icon bar of VS)
Hope this helps somebody...
@FredyWenger
Thanks!
You're welcome...
Only this worked for me on VS 2015:
open "DEBUG -> Windows -> Exception Settings"
tick the parent option "Common Language Runtime Exceptions" so all its children are ticked.
(same works with VS 2013 but on step 1. open "DEBUG -> Exceptions)
Same problem here (VS 2015 Enterprise)