Open Bug 1575024 Opened 5 years ago Updated 2 years ago

[jsdbg2] Debugger should have a function to reset all current hooks/state

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: loganfsmyth, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [debugger-mvp])

https://bugzilla.mozilla.org/show_bug.cgi?id=1564168 will be removing enabled, but one case where enabled was useful was to fully disable all functionality of the given Debugger object. While most enabled usage is easily dropped in favor of removeAllDebuggees, there are hooks like onNewGlobal and onGarbageCollection that are not related debuggees, and there are many others that don't run if you have no debuggees, but should also be cleared as well, like onDebuggerStatement and onNewScript and so on.

With this goal in mind, we'd want a new method named clear() or reset() or something, which would return the Debugger object to the state it was in immediately after it was created.

Type: task → enhancement
Priority: -- → P2
Whiteboard: [debugger-mvp]
Blocks: js-debugger
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.