facebookexperimental / ExtendedAndroidTools

Extended Android Tools is a place to host and maintain a build environment and makefiles cross compiling Linux tools we all love for Android.
Apache License 2.0
189 stars 63 forks source link

Implement Java debugger Python API #58

Open michalgr opened 1 year ago

michalgr commented 1 year ago

Raw JDWP is too verbose for convenient debugging experience. Ideally we would be able to debug Java processes using API consisting of Threads, StackFrames, Variables and Breakpoints that underneath translates all interactions to/from JDWP messages. The API should support two use cases:

@debugger.on("void java.lang.Integer.toString()") async def callback(event: BreakpointEvent): thread = event.thread println(f"Called toString on ${thread.frame[0].this}") println(thread.stackTrace) event2 = await thread.singleStep() println(thread.stackTrace)



Once completed we should be able to use new API to debug Java processes on host machine, as well as Java processes on Android devices.