Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Variable watchpoint doesn't work in Eclipse/ADT Android projects

public class Main extends Activity {
    int field = 0;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        int local = 0;
        field = local;
        local = field;
    }
}

I've put "watchpoint" on "field" and in "Breakpoint Properties" I confirmed that both access and modification are being watched. But the watchpoint didn't trigger the debugger to pause execution of program. Tried both in 2.2 AVD and on Desire with USB Debugging enabled. Anyone has experience on how watchpoint works with Android?

Thanks, Ryan

like image 951
Ryan Avatar asked Dec 16 '10 07:12

Ryan


1 Answers

I can't find an official google source that says that it does not work. However I keep finding mirrors of this document http://www.milk.com/kodebase/dalvik-docs-mirror/docs/debugger.html which says

Known Issues and Limitations - Most of the optional features JDWP allows are not implemented. These include field access watchpoints and better tracking of monitors.

like image 155
Carlos Rendon Avatar answered Oct 04 '22 07:10

Carlos Rendon