JDB Java debugger - how can I set verbose option to see why my app is crashing?

202 views Asked by At

I'm trying to debug some Android app with JDB Java debugger. Here are my steps:

  1. adb shell am start -D com.appname.global.android/.MainActivity
  2. adb jdwp
  3. adb forward tcp:8700 jdwp:<NEW_PORT>
  4. Add stop at com.appname.global.android.MainActivity:79 line to the C:\Users\UserName\jdb.ini file.
  5. "C:\Program Files\Java\jdk-17.0.2\bin\jdb.exe" -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700

So when I execute command from step 5, my app is resuming and I hit a breakpoint in JDB (in the "onCreate" method in my app). But after few seconds my app is crashing without even telling me what is wrong. Only message I get is this:

main[1]
main[1]
The application has been disconnected

So I would like to pass an verbose option to this command. In the help message it looks like this:

options forwarded to debuggee process:
-v -verbose[:class|gc|jni]
                  turn on verbose mode

But I can't figure out how to pass verbose option properly. Can you tell me how can I do it? Or maybe there is a better way of figuring out what is wrong with my app?

0

There are 0 answers