tonytye
tonytye

Reputation: 31

android eclipse debugger never starts

After starting the emulator from eclipse, I start my practice app to run under debug. Each time the console says the app was loaded and is starting on the device, but nothing ever happens. The debug session never starts. The alert message on the emulator that says "waiting for debugger" is never displayed. I later check and see that the app was successfully loaded and I can run in from the emulator, but without the debugger. Is there something missing in the process, is there some kind of flag to set that says debug=true somewhere? Can anyone offer a suggestion?

My manifest file is:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tryit1"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="15" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Tryit1Activity"
            android:label="@string/title_activity_tryit1" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application> </manifest>

Just in case this helps, here are related messages from the DDMS logcat:

09-25 12:03:56.962: W/ActivityManager(694): No content provider found    for permission revoke: file:///data/local/tmp/tryit1.apk  
09-25 12:03:57.272: W/ActivityManager(694): No content provider found for    permission revoke: file:///data/local/tmp/tryit1.apk
09-25 12:04:00.830: I/PackageManager(694): Removing non-system package:com.example.tryit1 
09-25 12:04:00.865: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:01.893: I/PackageManager(694): Package com.example.tryit1 codePath changed from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk; Retaining data and using new 
09-25 12:04:01.981: I/PackageManager(694): Running dexopt on: com.example.tryit1 
09-25 12:04:05.004: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:05.043: W/PackageManager(694): Code path for pkg : com.example.tryit1 changing from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk 
09-25 12:04:05.111: W/PackageManager(694): Resource path for pkg : com.example.tryit1 changing from /data/app/com.example.tryit1-1.apk to /data/app/com.example.tryit1-2.apk 
09-25 12:04:05.560: D/PackageManager(694): New package installed in /data/app/com.example.tryit1-2.apk 
09-25 12:04:06.007: I/ActivityManager(694): Force stopping package com.example.tryit1 uid=10044 
09-25 12:04:08.161: D/BackupManagerService(694): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.tryit1 flg=0x8000010 (has extras) } 
09-25 12:04:08.800: D/BackupManagerService(694): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.tryit1 flg=0x8000010 (has extras) }

Upvotes: 3

Views: 279

Answers (1)

Yury
Yury

Reputation: 20936

To start debugging:

  1. you should go to ddms
  2. select your the process of your application
  3. click on a greed bug button (after that this bug should appear near your process)

enter image description here

You should also check that android:debuggable property of your application in AndroidManifest.xml is set to true.

Upvotes: 2

Related Questions