Closed Bug 723556 Opened 12 years ago Closed 4 years ago
Add breakpoints to Scratchpad
Once the debugger lands we should have a way to quickly add breakpoints to scratchpads.
We need a Debugger Client in the Scratchpad. Debugging could happen either directly in the scratchpad itself or in the tab. TBD. Filter on BLACKEAGLE?!
Priority: -- → P3
One way this could work that provides additional benefits is to display the currently loaded scratchpads in a separate group in the debugger source list (content scratchpads in the content debugger, chrome scratchpads in the browser debugger). This way open scratchpads become visible in the debugger as first-class citizens, so breakpoints etc. will Just Work. This could be implemented by having the debugger request the list of scratchpads from ScratchpadManager and refresh it any time a newSource event arrives for a client-initiated eval[InGlobal[WithBindings]]. I might be missing some details until bug 825039 is finalized, but this approach should be way simpler than adding all of the debugger's inspection abilities (line/conditional breakpoints, etc.) to scratchpad. It will also retain Scratchpad's current intuitive behavior as an editor, with the debugger as the inspection tool. Lastly, I should point out that this approach does not preclude making the Scratchpad window more debugger-like with breakpoints, etc., in case we see real value in that. Chrome devtools have a similar concept called snippets that seem to work like our scratchpad and they also display them in the debugger sources pane, in a separate tab.
Depends on: 825039
(In reply to Panos Astithas [:past] from comment #3) > real value in that. Chrome devtools have a similar concept called snippets > that seem to work like our scratchpad and they also display them in the > debugger sources pane, in a separate tab. Hi Panos! One disadvantage of Google Chrome snippets is that they have to be created in the Source Snippets tab. That's why I wrote https://github.com/bgrins/devtools-snippets/tree/master/import-export/chrome to ease the import/export chore.
+1. This would be especially useful for education, when a longer snippet does something unexpected.
+1 this is a basic feature that sholuld be implemented
+1. I'd like to be able to add code for a page in the scratchpad, and be able to set breakpoints. Similar to Chrome's snippets feature.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.