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.


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



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

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

  2. […] I am narrowing down the camera problems by remote debugging with Eclipse. Please see the following articles on how to setup remote debugging for Android/Cyanogenmod: Loading source in eclipse – CyanogenMod Wiki Using Eclipse | Android Open Source Android Quick Tip – 1 liner to make the VM wait for debugger to connect Show me the code! &#82… […]

    Pingback by [DEV] Continuing Triumph ICS Development - Page 17 - Android Forums — February 15, 2012 @ 4:58 pm

  3. Hmm is anyone else experiencing problems with the pictures
    on this blog loading? I’m trying to figure out if
    its a problem on my end or if it’s the blog. Any feed-back would be greatly appreciated.

    Comment by www — September 18, 2013 @ 4:26 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: