You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



jsdbgapi Enhancements

jsdbgapi is the lowest layer of the debug system. It is built into the JavaScript engine itself and is exposed via mozilla/js/src/jsdbgapi.h. jsdbgapi predates the existence of any debuggers for JavaScript. It was enhanced to support JSDebugger 1.1 and has been further enhanced since.

TBD Add link to list of abilities in existing api.

Enhancement ideas...

  • Convert numerous get/set hook calls to a 'block of hooks' api.
  • Add api to fill array of bit flags indicating which souce lines of a script have executable code; i.e. where breakpoints can be set.
  • Add api to iterate trynotes; i.e. to figure out ranges of lines protected by try blocks.
  • Add api to get pc of catch for a given pc in script (or null if none). To distinguish caught from uncaught exceptions (before the stack unwinds).
  • Add watchpoint iterator and finder.
  • Write srcnote for 'end of block' to make script ranges include trailing lines that don't happen to have code.

last update: John Bandhauer 16 November 1998