Search code examples
androideclipsedebuggingintellij-ideabreakpoints

The application runs in the debugger mode, the debugger won't connect


My Android application somehow stopped to pay any attention to the breakpoints. I have added the

android:debuggable="true"

to the manifest. So now it is:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.innodigital.iptv.PackVideo"
    android:versionCode="1"
    android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SET_DEBUG_APP"/>

<uses-sdk android:minSdkVersion="10" />

<application android:icon="@drawable/icon" android:label="@string/app_label" android:debuggable="true">
    <activity android:name="PackVideo"
              android:label="@string/app_label"
              android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
              >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="ChannelsListActivity"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
              >
        <intent-filter>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity android:name="ServerSetActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
              >
        <intent-filter>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>
</manifest>

I have returned debugger timeout to the default 3000 ms.

I had restarted the device I am working with and the PC.

Nothing helps.

I have installed IntelliJ IDEA 11 and run the debugging there. Same reaction: no stops on breakpoints.

Where should I look else? Beforehand grateful.

Edit: It seems debugger won't connect. Even after I am setting the timeout to 10 seconds.

Attempting to connect debugger to 'net.innodigital.iptv.PackVideo' on port 8615

waits forever.


Solution

  • Ho! It was very interesting. It happened, that yesterday I have exported APK and installed it on the same device. And it seems, that that instance of the application didn't let the instance from PC (being newly debugged) to be installed into the device. But it started to run itself instead. And the debugger couldn't connect the old APK with the new (even if almost the same) code. That explained:

    1. Why both IntelliJ IDEA and Eclipse couldn't connect the debugger to the application
    2. Why, after uninstalling of the application from the device, the debugging launch went OK.

    What interesting conclusions could be made of it:

    1. We should never mix the different kinds of installations (from PC, from SD). Uninstall one, than install the other.
    2. The installations from PC and from SD behave differently. That could cause other unwanted effects. We should be aware of it.