Xamarin Android Debugging

Good day.

May I ask if you guys also experience where you cant move the debugging cursor wherver you wanted? ex.. im in line1 and i want to move the cursor to line 5 to skip line 2 to 4... this is very easy in web projects where i can drag the cursor to line 5.. but in xamarin android i wasnt able to do so, coz its not movable...

is this really how we debug in xamarin android? or am i missing some plugins? or settings?

thanks

Answers

  • JoebetMutiaJoebetMutia USMember ✭✭

    anyone?

  • seal2002seal2002 VNMember ✭✭

    Hello,
    My solution is simple as I put the break point to line 5, press F5 and run to it. I use Visual Studio 2017 Community on Windows 10. Hope it help.
    Regards,
    Seal

  • alicia1988alicia1988 INMember

    @seal2002 said:
    Hello,
    My solution is simple as I put the break point to line 5, press F5 and run to it. I use Visual Studio 2017 Community on Windows 10. Hope it help.
    Regards,
    Seal

    Useful :)

  • JoebetMutiaJoebetMutia USMember ✭✭

    @seal2002 said:
    Hello,
    My solution is simple as I put the break point to line 5, press F5 and run to it. I use Visual Studio 2017 Community on Windows 10. Hope it help.
    Regards,
    Seal

    No its not that simple.... if you do that you didnt skip the lines 2 to 4....

    Its not just skipping.. in web or windows forms you can drag the debugging pointer back... example.. you are in line 5.. and you wanted to go back to line 2...

    Anyone? please?

  • JoebetMutiaJoebetMutia USMember ✭✭

    anyone?

  • JoebetMutiaJoebetMutia USMember ✭✭

    up

  • LotokLotok GBMember ✭✭

    Comment out the lines you do not want to run? can you before specific about why the lines cannot run for your test but need to be there? With more details there might be more useful ideas.

  • JoebetMutiaJoebetMutia USMember ✭✭
    edited October 2017

    @Lotok said:
    Comment out the lines you do not want to run? can you before specific about why the lines cannot run for your test but need to be there? With more details there might be more useful ideas.

    Good day Lotok.

    What I am after is the feature presented by Webforms, MVC or windows forms for example...

    Im in line1 out of 10 lines of codes.

    I had breakpoint in line 1.. and for some circumstances i need to skip line 2 to 5... so i move the cursor to line 6... then i went to line 7 8 9.. but then again.. i needed to check another condition and would like to move the cursor to line 1 again....

    all of that is doable in webforms mvc and windows.. and some of my colleagues said its douable..but i posted same question in xamarin facebook group, some guys said they have the same problem with me..

    Thats why im confuse wheter im missing a config? or this is still in progerss

    some folks in bug zilla confirms this is already supported way back 2014..

    https://bugzilla.xamarin.com/show_bug.cgi?id=2854
    https://bugzilla.xamarin.com/show_bug.cgi?id=813

    other notes
    https://stackoverflow.com/questions/37919855/dragging-the-instruction-pointer-backward-while-debugging-in-visual-studio

    Thanks

  • lahellerlaheller USMember ✭✭
    edited October 2017

    In the worst case you still can add some logging lines to your code, like:
    System.Diagnostics.Trace.WriteLine("Value of variable N: " + n);

    And on your computer just watch the logcat in CMD console by typing:
    adb logcat -v long monodroid:V mono-stdout:V *:S

  • JoebetMutiaJoebetMutia USMember ✭✭

    @laheller said:
    In the worst case you still can add some logging lines to your code, like:
    System.Diagnostics.Trace.WriteLine("Value of variable N: " + n);

    And on your computer just watch the logcat in CMD console by typing:
    adb logcat -v long monodroid:V mono-stdout:V *:S

    thats helpful bro but still it doesnt answer the question :(

    anyone please?

  • JoebetMutiaJoebetMutia USMember ✭✭

    bump

  • JoebetMutiaJoebetMutia USMember ✭✭

    bump

  • wallymwallym USInsider, Beta ✭✭✭

    I think you are looking for a feature available from Msft when debugging in windows (or at least a msft platform). I too sorely miss the ability to move to different lines. Heck, I'd be happy with edit and continue. It has been my understanding for a while that there are certain debugging features that aren't available because "it's android." I got the impression that these features were not going to be available. Yeah, I miss these features to. If you find something out, let us know.

  • JoebetMutiaJoebetMutia USMember ✭✭

    @wallym said:
    I think you are looking for a feature available from Msft when debugging in windows (or at least a msft platform). I too sorely miss the ability to move to different lines. Heck, I'd be happy with edit and continue. It has been my understanding for a while that there are certain debugging features that aren't available because "it's android." I got the impression that these features were not going to be available. Yeah, I miss these features to. If you find something out, let us know.

    at last one good answer... iwas in the impression that it is what it is.. i was just confuse since i found some bug zilla saying its already fixed, deployed and working but its not.. and some of my friends said its working on there side.. anyway... thanks wallym

  • AJ.mAJ.m USMember ✭✭

    @JoebetMutia said:

    @seal2002 said:
    Hello,
    My solution is simple as I put the break point to line 5, press F5 and run to it. I use Visual Studio 2017 Community on Windows 10. Hope it help.
    Regards,
    Seal

    No its not that simple.... if you do that you didnt skip the lines 2 to 4....

    Its not just skipping.. in web or windows forms you can drag the debugging pointer back... example.. you are in line 5.. and you wanted to go back to line 2...

    Anyone? please?

    So you want to not run lines 2, 3, and 4? Why don't you just comment them out?

  • JoebetMutiaJoebetMutia USMember ✭✭
    edited October 2017

    @AJ.m said:

    @JoebetMutia said:

    @seal2002 said:
    Hello,
    My solution is simple as I put the break point to line 5, press F5 and run to it. I use Visual Studio 2017 Community on Windows 10. Hope it help.
    Regards,
    Seal

    No its not that simple.... if you do that you didnt skip the lines 2 to 4....

    Its not just skipping.. in web or windows forms you can drag the debugging pointer back... example.. you are in line 5.. and you wanted to go back to line 2...

    Anyone? please?

    So you want to not run lines 2, 3, and 4? Why don't you just comment them out?

    Its an example @Aj.m.. there are complex exmples like you need to change the value of something and let it pass on that line or not.. or move to the first line or move to another method...

    i really dont know why im explainint this further... but i guess as a experience dev.. commenting is not the answer..

    So lets say we move to your suggestion.. so its fine for you to comment line 2 - 4.. run debug (wait for 3 minutes to be deployed) uncomment line 2 and 4.. (wait for 3 minutes to be deployed) comment 2 and 3.. again and again.. isnt it convenient to allow us to move teh debugging cursor? while debugging?

  • ardykuncoroardykuncoro Member

    @JoebetMutia do you have an answer about this issue? i have same problem with you.

  • PriyanKaAgRawaLPriyanKaAgRawaL Member ✭✭
    edited May 2018

    @JoebetMutia
    So lets say we move to your suggestion.. so its fine for you to comment line 2 - 4.. run debug (wait for 3 minutes to be deployed) uncomment line 2 and 4.. (wait for 3 minutes to be deployed) comment 2 and 3.. again and again.. isnt it convenient to allow us to move teh debugging cursor? while debugging?

    :smiley: :smiley: :smiley:
    You have really been explaining well this issue.

    Even I am facing same issue. As I know there is no solution as of now.

  • ardykuncoroardykuncoro Member

    @PriyanKaAgRawaL said:
    @JoebetMutia
    So lets say we move to your suggestion.. so its fine for you to comment line 2 - 4.. run debug (wait for 3 minutes to be deployed) uncomment line 2 and 4.. (wait for 3 minutes to be deployed) comment 2 and 3.. again and again.. isnt it convenient to allow us to move teh debugging cursor? while debugging?

    :smiley: :smiley: :smiley:
    You have really been explaining well this issue.

    Even I am facing same issue. As I know there is no solution as of now.

    ok, i found the way how to move the cursor in debug mode, right click on line of code you want to move, and select "Set Next Statement" or press Shift + Command + F10

Sign In or Register to comment.