jdwp

How to debug an android application started from 'adb shell am start -D '?

醉酒当歌 提交于 2019-11-29 07:12:58
问题 I need to debug an android application that is already installed on a phone. I am able to start the application in debug mode but I can't connect to the process using JDWP. I have try two different ways that both fail. (see following sections) Command line attempt 1- Start the application [...]sdk\platform-tools>adb -d shell am start -D -n "package/package.SomeActivity" The application starts and a alert display "/!\ Waiting for debugger". 2- Open a JDWP port [...]sdk\platform-tools>adb

ERROR: JDWP Unable to get JNI 1.2 environment

元气小坏坏 提交于 2019-11-27 06:47:06
I get this error after debugging in Eclipse. The debug is successful though. ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2 JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820] What does it mean? Looks like http://bugs.sun.com/view_bug.do?bug_id=6476706 which has low priority and is still not fixed. Definitely a Mustang bug but no clear explanation (seems to occur pretty randomly according to the bug reporters on top of that). Vasile Surdu Just add System.exit(0); to the end of your main method. That's all you have to do. It's

How to debug an android application started from 'adb shell am start -D '?

早过忘川 提交于 2019-11-25 15:19:01
I need to debug an android application that is already installed on a phone. I am able to start the application in debug mode but I can't connect to the process using JDWP. I have try two different ways that both fail. (see following sections) Command line attempt 1- Start the application [...]sdk\platform-tools>adb -d shell am start -D -n "package/package.SomeActivity" The application starts and a alert display "/!\ Waiting for debugger". 2- Open a JDWP port [...]sdk\platform-tools>adb forward tcp:8000 jdwp:7602 3- Attempt to connect using jdb [...]sdk\platform-tools>jdb -attach 127.0.0.1