
These two weeks I worked on basic integration of the debugger prototype into the Processing Development Environment (PDE).
For starters I had to get familiar with the existing code base. So I started putting breakpoints and running the application.
After many sessions of running the PDE, I came across a flow of control of what happens when the run button is clicked.

A breif description of all the classes involved are given below :
AndroidEditor : Defines the editor properties required for android development, like defining the Android menu in the menu bar.
AndroidMode : Programming mode to create and run Processing sketches on Android devices.
AndroidRunner : Launches an app on the device or in the emulator.
Device : Holds the instance of a device and defines functions executed on a device, like ADB commands.
Now, after recognising the flow, I started integrating the the debugger, for keeping things simple I put the prototype code directly into the 'Device' class. Now whenever installApp() is called the debugger is attached to the device and watches the MouseX variable (for reference please look at my Debugger Prototype repo).
As the sketch class name is currently hardcoded into the debugger, it is now made variable, so that any sketch can be attached. Now the debugger attaches automatically to the sketch it is run from.
After writing all the code to compile the project the two new packages used viz. jdi.jar, jdiModel.jar needed to be added in the build.xml, as we use ant to compile our project.
Once the packages were added and the project compiled the prototype was up and running, integrated directly into the PDE.
Commits involving the above changes :
Comments