Forum Xamarin.Forms


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Edit code during debug session on Android

HarbHarb USMember ✭✭

Hi guys! This seems to be a quite noobish problem, nonetheless, still encountering the issue...
Some details: Xamarin Forms, PCL, Android emulator.
Is there any way to edit the code during a debug session? Also, is there a way to step back in the code during debugging? I assume the target emulator is not capable do these things, or is it? I also have a physical Android phone, which might help the situation.


  • RVxRVx USMember ✭✭
    edited April 2017

    As far as i know, and have ever heard off, it is not possible to change the code in runtime.

    Remember the code you see is not the code running. The code is compiled(changed to something a machine can understand. the source language or machine instructions ) and then run.
    you can however if you stop the code with a breakpoint edit a memory location. ex. change a string or an int.

    I have not heard of any way to step back when debugging that would require to save the entire "state"(all memory and storage) of the simulator for every code step and take massive amounts of memory.

    Edit: if you want to learn more there is more here:

    And Xamarin is basicly an other layer of programming:

    Xamarin lets developers build native apps for Apple, Android, and Windows devices with a single language, C#, and a single IDE, either Visual Studio or Xamarin Studio. Whichever of these IDEs you use, you’ll have all the Software Developer Kits (SDKs) associated with not just the Windows platform (C# and Visual Studio are Windows tools) but the Android and Apple ones as well. So, instead of having to master all the languages, you can build native mobile apps for multiple device types using just one. Everything starts with C#, but Xamarin translates—or compiles—all the coding to make it work on the other device platforms.
    - Xamarin.iOS does full Ahead of Time (AOT) compilation to produce an ARM binary that’s compatible with Apple’s App Store.
    - Xamarin.Android uses Just in Time (JIT) compilation for Android devices.

  • HarbHarb USMember ✭✭
    edited April 2017

    Thank you for your information!

    What you said is correct, although, what I asked is not impossible. In "casual" (WPF, ASP.NET, etc) .net programs the user is able to step back and alter the code as well. (Which is awesome.) Of course, in this situation the target device differs from the compiling one, where the code is developed.

  • DonpreciousDonprecious Member

    It will be possible soon.

  • ErdoganErdogan Member ✭✭✭

    any good news?

Sign In or Register to comment.