Show me the code! – By Davanum Srinivas

December 4, 2007

Android Quick Tip – 1 liner to make the VM wait for debugger to connect

Filed under: android — Davanum Srinivas @ 6:46 am

Add this line in your code and when you run the application hits this method, it will wait till you connect with a debugger.


android.os.Debug.waitForDebugger();

Which port you ask? run the “ddms” utility and see for yourself which port your application is waiting on.

1 Comment »

  1. you can also check the option in your development settings.

    Comment by wicketthings — December 5, 2007 @ 1:19 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.