How to access JavaScript execution trace at runtime in Firefox?-Collection of common programming errors

Firebug is currently using JSD (jsdIDebuggerService) to figure out, which line is executable. However, the plan is to switch to JSD2 (work in progress) https://wiki.mozilla.org/Debugger

You should also base your extension on JSD2

Look for getLineOffsets(line) and getOffsetLine(offset) in the Debugger document. I didn’t test it, but I think that if getLineOffset returns null, the line is not executable.