2

Using the developer tools on an emulator I have an application wait for the debugger before starting, but immediately after jdb is attached the application will have an undesirable yet handled exception. I can't debug this exception since jdb wont stop on it. I therefore need to be able to set catch java.lang.Exception before the application continues. How can I do that?

I use jdb with:

adb forward tcp:7777 jdwp:$(adb jdwp | tail -1); jdb -sourcepath ./wallet/src -attach localhost:7777
Matthew Mitchell
  • 5,293
  • 14
  • 70
  • 122

1 Answers1

-1

You can pipe the suspend command into jdb without piping a EOF like so:

adb forward tcp:7777 jdwp:$(adb jdwp | tail -1); { echo "suspend"; cat; } | jdb -sourcepath ./wallet/src -attach localhost:7777
Matthew Mitchell
  • 5,293
  • 14
  • 70
  • 122