Update: IFrame & Mojo Debugger
There is an update to the IFrame. RAB and KAM (many thanks) have posted there update here. This will make it’s way into the main source update really soon I promise. It’s remiss of me to update this stuff but life has intervened.
As mentioned in the previous post I had a look at the WebOS SDK and was mightily dissapointed that Palm hadn’t bothered to hook the debugger into the Eclipse plugin. Well I though it might be an interesting project to try and write a debugger front-end.
I started off looking at the ports from the emulator and trying to capture the commands that go between the two using WireShark. No luck, not sure why but it seems that it can’t capture stuff between the virtual network link and the host PC. Fair enough. I then looked into their jar files that compose the Palm plugin and realised that I could call their API to do the same thing. So, I recreated their plugin. This wasn’t easy..
Writing an Eclipse plugin is a bit of a dark art. It’s one of those thing that most programmers don’t have to do. So far I have the following working:
- Launching an application.
- Terminating an application.
- Launching the debugger.
- Talking to the debugger to start and stop the application.
- State machine for processing debugger output.
- Capture break condition to extract method, line and column numbers.
- UI reflecting pause status correctly.
- Eclipse shutdown pulling down any application launched from Eclipse plugin.
Talking to the emulator requires the use of methods from the Palm JARs bundled with the SDK. The API lets me open a TTY terminal connection to the emulator. I am querying if there is an existing debug process and if not it will start one up. At that point we can control the debugger and get output back from it.
The response is processed depending on the current ’state’. The state is set by the operations from the user (break, run etc) and a state machine transitions around to capture the output and process it accordingly.
Comments
Leave a Reply