1

I'm trying to use JDWP to catch an uncaught Exception on Android.

I've tried many different combinations of the following but it never gets any Exception Events, only the Single Step Events.

It's not getting any composite Events, in each case the Event count is '1'.

The EventRequest Set is set up correctly:

EVENT_KIND_EXCEPTION
SUSPEND_THREAD_ALL
Modifiers: 1
MOD_KIND_EXCEPTION_ONLY
[referenceTypeID]
FALSE (caught)
TRUE (uncaught)

I've tried it with and without Modifiers. With different referenceTypeIDs like '0' for all, 'Ljava/lang/Throwable;' etc. And I've tried to use the Count Modifier also. Also CLASS_PREPARE with CLASS_MATCH.

After I Step over the Exception causing statement Java catches and prints out the Exception then it jumps to the OS's 'Landroid/app/ActivityThread;' performResumeActivity()

But it never gets any Exception Event.

I'd like to be able to catch any uncaught Exception but I can't even get it to catch a specific one.

jdb does the same thing if you don't give it a 'catch' command.

I've tried to look what jdb and Apache Harmony does also.

Thanks!

user1572522
  • 569
  • 2
  • 11
  • 26

0 Answers0