Eclipse debugging Android app - debugger shows wrong line executing -


while implementing twitter integration in app, discovered following oddness of eclipse debugger. causing this?

i'm using asynctask getting request token twitter using twitter4j 3.0.3.

    public class twitterrequestasync extends asynctask<void, void, requesttoken> {          private context context;          public twitterrequestasync(context context) {              this.context = context;         }          @override         protected requesttoken doinbackground( void... params ) {              twitter twitter = gettwitter();     // gettwitter() in enclosing class             try {                 requesttoken token = twitter.getoauthrequesttoken();                 return token;             }             catch (twitterexception e) {                 log.e( tag, e.getmessage(), e );                 return null;             }         }          @override         protected void onpostexecute( requesttoken result ) {              super.onpostexecute( result );             if ( result != null ) {                 // stuffs concerning request token here             }         }      } 

when debug code appears there exception thrown when getoauthrequesttoken() executes , next line debugger shows executing in catch clause, return null;

however, result returned onpostexecute(...) valid request token, debugger doing weird. i've cleaned project , restarted eclipse each multiple times no change in behavior. broken?

this known issue. appears problem dalvik vm. last return statement of method shown execute in debugger.

changing doinbackground body to:

        @override         protected requesttoken doinbackground( void... params ) {              twitter twitter = gettwitter();             requesttoken token = null;             try {                 token = twitter.getoauthrequesttoken();             }             catch (twitterexception e) {                 log.e( tag, e.getmessage(), e );             }             return token;         } 

causes execution appear proceed expected.

see https://groups.google.com/forum/?fromgroups=#!topic/android-developers/deu6jmdyfym old mention of problem link older mention. created issue @ https://code.google.com/p/android/issues/detail?id=34193.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -