1. Download our Official Android App: Forums for Android!

Apps Debug - How To ?

Discussion in 'Android Development' started by ac4android, Mar 17, 2016.

  1. ac4android

    ac4android Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    53
    Posts:
    198
    Joined:
    Nov 3, 2015

    Nov 3, 2015
    198
    29
    53
    Hi.

    Recently I wanted to debug some lines of codes by getting at the values of the variables. I did that one line at a time, by marking it with the "red dot" to the far left in debug mode.

    I then run the code 'til it got to the "red dot", "stepped into" it to find a whole lot of behind-the-scene codes that A/S has done for us. Typically it would take me about 60-70 clicks to work through them before getting a value for the parameter, sometimes more, taking many minutes.

    Alternatively, I could "step out", which takes me to the next line of code. But in most instances, I do not get a value for the variable I wanted to check out if I step out.

    QUESTION: Is there a way I can avoid stepping through the behind-the-scene codes and get to the actual line of code to debug?
     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,849
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,849
    11,457
    1,988
    Male
    Software developer
    South West of England
    If you want to 'step into' one of your own methods, that's fine, but it sounds like you stepped into the system framework code, which you're probably not interested in.
    If all you wish to do is advance to the next line in your code, use the 'step over' button.

    Can you attach a screenshot of the code you are wanting to debug?
     
    #2 LV426, Mar 17, 2016
    Last edited: Mar 17, 2016

Share This Page

Loading...