views:

31

answers:

2

I have a activity B that is called by activity A, I want to debug the code in B. I have set the breakpoint, however the debug control never enters B.

public class A extends Activity {

  Intent j = new Intent(mContext, B.class);
                    startActivity(j);



}

--

public class B extends Activity 

{

some code

--Break Point-- // I want eclipse pointer to stop here while debugging.

}


When I debug in eclipse, although the class B is called from class A, the debbugger pointer never enters the new window, where I have placed a debug point in Class B. I am not able to take the pointer control to class B and stop at a specific point, which will help me verify certain variable values. Hope this time the question makes sense.

+1  A: 

Sounds to me like the section of your code that you're trying to debug is never actaully accessed.

Have you tried setting a breakpoint in Activity A before the code, somewhere you know is being called, step though the code until you reach the activity you want to debug and then step into Activity B. My guess is that the code isn't reaching Activity B at all.

Tr1stan
Hello Tr, I do reach activity B, I tried to toast a message from B and it shows up. But while in eclipse debug mode, the control just doesn't get there.
A: 

Could this be because you are trying to 'Step over' instead of 'Step into'?

Jatin