Debugger not working anymore ? RRS feed

  • Question

  • User273348 posted


    After upgrading a few days ago to the newest versions in Xamarin Studio, I'm not able to debug anymore in Android ? Anyone experienced that and have any suggestions what to do ? If I try to set a breakpoint, it simply turns into a red circle instead of a filled dot ?

    Someone mentioned mono 5 was the issue, but I have tried to downgrade and no difference ... I also tried installing the new Visual Studio for Mac, but no different. If i start a brand new forms project, I'm still unable to debug.

    Have tried deleting both bin and obj dirs but no difference. Debug IS working for the iOS part, though ...

    Please help me, I really really need this to work like yesterday ;-)

    Cheers, Kent Fonager

    Wednesday, May 17, 2017 9:26 AM

All replies

  • User256018 posted


    I am desperate, too. Today I updated the Xamarin SDK in VS2015 and now have the same situation you described. Unable to debug the Android project of a Xamarin.Forms solution.

    I posted a question on SO : https://stackoverflow.com/questions/44137926/xamarin-forms-debugger-not-working-in-vs-2015-since-update-to-latest-stable-xama

    Have you found a solution?

    Best Eric

    Tuesday, May 23, 2017 7:37 PM
  • User328246 posted

    I am facing the same problem with Xamarin Studio. Have you found any solution?

    Tuesday, June 13, 2017 7:50 PM
  • User273348 posted

    Nope, it is still not working. SO frustrating !

    Wednesday, June 14, 2017 9:26 AM
  • User147638 posted

    I'm getting the opposite - iOS solution will debug, Shared libraries won't

    Friday, June 16, 2017 11:09 AM
  • User228975 posted

    Did the latest update fixed the problem. I have yet to update as I am working on releasing an app and not wanting to jinks it.


    Friday, June 16, 2017 11:14 AM
  • User256018 posted

    Try the workaround described here and let me know https://bugzilla.xamarin.com/show_bug.cgi?id=56893

    Wednesday, June 28, 2017 1:42 PM
  • User35208 posted

    @Fonager I had this exact problem today with VS for Mac. I deleted all my bin and obj dirs and rebuilt and could once again debug.

    Wednesday, June 28, 2017 4:53 PM
  • User256018 posted

    @TedRogers My problem is that in VS for Mac I get that error. Do you know how to fix that? It's a Xamarin.Forms PCL (profile=259) based DROID/iOS solution which compiles and runs fine on VS2015 Enterprise SP 3.

    /Users/roland/Projects/git/TruckerApp/packages/Xamarin.Forms.,3): Error MSB4018: The "XamlCTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not find file "/Users/roland/Projects/git/TruckerApp/truckerrolsped/obj/Debug/truckerrolsped.dll.mdb". File name: '/Users/roland/Projects/git/TruckerApp/truckerrolsped/obj/Debug/trucker_rolsped.dll.mdb'

    Server stack trace: at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00293] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:282 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:149 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/FileStream.cs:86 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess) at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename) [0x00000] in :0 at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename, System.Guid assemblyGuid) [0x00000] in :0 at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.String fileName) [0x00012] in :0 at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00032] in :0 at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00042] in :0 at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00028] in :0 at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000a] in :0 at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in :0 at Xamarin.Forms.Build.Tasks.XamlCTask.Compile (System.Collections.Generic.IList`1[T] thrownExceptions) [0x001ca] in <8cb029844f1042e6a4a06f623985b8f8>:0 at Xamarin.Forms.Build.Tasks.XamlCTask.Execute () [0x00007] in <8cb029844f1042e6a4a06f623985b8f8>:0 at (wrapper xdomain-dispatch) Xamarin.Forms.Build.Tasks.XamlCTask:Execute (object,byte[]&,byte[]&)

    Exception rethrown at [0]: at (wrapper xdomain-invoke) Xamarin.Forms.Build.Tasks.XamlCTask:Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632 at Microsoft.Build.BackEnd.TaskBuilder+d_26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 (MSB4018) (truckerrolsped)

    Wednesday, June 28, 2017 5:15 PM
  • User35208 posted

    @EricBrunner sorry, no idea.

    Wednesday, June 28, 2017 5:25 PM
  • User35208 posted

    @EricBrunner For what is is worth, today I cannot get breakpoints working in iOS. I tried all the delete obj and bin folders like I did with Android to no avail.

    I agree with @Fonager...very frustrating!


    Thursday, June 29, 2017 10:44 AM
  • User256018 posted

    @TedRogers I don't know what you mean with "for what is it worth ..." However. I can suggest you to follow that

    link : https://bugzilla.xamarin.com/show_bug.cgi?id=56893

    Try that what Brendan suggested:

    Brendan Zagaeski (Xamarin Support) 2017-06-01 02:11:17 UTC

    Possible temporary workaround: switch the portable class library project(s) to output "portable" PDB files rather than "full" PDB files

    1. Open the portable class library .csproj file in a text editor. For example, right-click the project in the Solution Explorer and select Unload Project, and then right-click it again and select "Edit ...".

    2. Under the PropertyGroup for the "Debug|AnyCPU" configuration, change the DebugType to: portable

    3. Save the change and reload the project.

    4. Build, deploy, and start debugging the iOS app project again.

    This workaround was successful in my particular test environment using the scenario described in Comment 0, but there might be other scenarios where the workaround will not be effective.

    (In Visual Studio 2017, the DebugType setting can also be changed under "Project Properties > Build [tab] > Advanced [button] > Debugging information".)

    If that doesn't solve the problem I can only suggest what I currently do:

    1. The native platform specific project in iOS is debugable.
    2. The PCL or Shared Library Xamarin.Forms project library is currently not debugable in iOS (maybe the workaround above solves that issue).
    3. I run the native iOS Simulator (eg. iPhone 7 Plus iOS 10.3) on the Mac. I start debugging in VS2015 with that native Simulator which is in fact debugable. So you can set breakpoints anywher you want (platform specific iOS, Droid and the shared portable library or PCL library).

    In general you can solve a lot of issues that way.

    Hope that is helpful.

    PS: And yeah, WTF is Microsoft and the Xamarin Dev Team doing all day long ? Torture us developers. best Eric

    Thursday, June 29, 2017 11:37 AM
  • User369352 posted

    I am using visual studio 2017 enterprise with latest updates of Xamarin. When I populate c# model class object with values it returns me empty object.

    That object I am passing to web api which is passed as empty object results in unexpected results from api. Any help??

    Sunday, June 3, 2018 5:55 PM
  • User369352 posted

    This is the screenshot of the c# object details.

    Sunday, June 3, 2018 5:57 PM