Sunday, October 19, 2008

JDWP (wtf?) analyzer in the Open (Source)

During my years with Sun Microsystems I've worked on a number of projects. One of the responsibilities I've held was ensuring that the NetBeans debugger works well with J2ME emulators (WTK, Nokia, Sony Erisson etc.)

This was no small feat given that I've had to analyze the source of a given debugging problem, this could be:

  • JDI implementation
  • NetBeans debugger
  • Emulator (most of the time not supplied by Sun)
and then negotiate with the responsible team(s) to fix the problem (sometimes fixing it myself and supplying a patch). This job would have been a pain if it wasn't for a small command line utility that Martin Ryzl (then my team leader, later my manager, now still someone I very much respect) wrote to monitor the JDWP traffic, when the job was his. Since the job was now mine, I took the utility and expanded it to a full blown GUI tool that can monitor JDWP packets and show detailed information about their contents and inter-relationships.

This was about 4-5 years ago, since then NetBeans including Mobility support went open source and with it most of my code, except for this last piece of work. With a blessing from Martin I am open sourcing it on java.net. It saved me a lot of time analyzing problems and hopefully it will make someone else's life easier as well.

3 comments:

Anonymous said...

Fantastic, well done. I am just starting implemention of the full JDWP spec for a new VM and this is a god-send. I can watch how the Sun VM interacts with a debugger - most informative. Very much appreciated, and all the virtual beers in the world to you ...

Anonymous said...

... except that there is no traffic at all on the mailing lists, I have found a couple of bugs and have fixed them .. and have no means to contribute them back ... (yes, I have mentioned my fixes on the mailing list) ...

Zero Effort said...

will fix the packet details up and add myself as a listener on the mailing lists - ooops ..