Closed Bug 966254 Opened 11 years ago Closed 6 years ago

Bigger conditional breakpoint input field

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pbro, Unassigned)

References

(Blocks 1 open bug)

Details

There's some context information in bug 966198, but essentially, this is about making the conditional breakpoint input field more like a textarea, or even something that supports syntax highlighting (like scratchpad). Indeed, it's super useful to use conditional breakpoints to inject code in the running site (especially if it's a production bug you're investigating on a platform where you can't change source files), but the single-line input field make it pretty hard to do so. Also, when you do that, you normally don't want to halt execution, just want to log something, or inject some code to test a fix, so this bug really goes together with bug 966198 in that it would require a "auto-resume exection" option in there too.
Thinking about it, it's starting to look more like being able to edit running code and have it pick up the changes (which Chrome does). But to be honest, I don't always find code editing very useful. I sort of prefer injecting code in certain places and be able to very quickly switch it on and off (like a breakpoint allows). I'm thinking aloud here, but it'd be pretty awesome if these new types of breakpoints would actually show inside the code, like an extra block of code, highlighter differently from the rest.
If modifying or injecting code is what you are really after, then the Scratchpad live function evaluation (Cmd-E) may suit you better: http://fitzgeraldnick.com/weblog/52/
That's useful indeed, but I still think that injecting log statements, or extra lines of code where they belong (i.e. in the code) feels more natural. Also, with scratchpad, it's not always possible to override the function you need (if you can't reference from the global scope), and you have to override it completely, whereas with conditional breakpoints, you just include extra lines anywhere in the body of any function.
You are right, I filed bug 966262 for making Scratchpad work for this uses case, too.
See bug 771339 also for live editing, although it is still a ways off.
Priority: -- → P3
Nick said in bug 983470: "It should be a source editor instance so that you get syntax highlighting and paren matching etc. Imagining maybe 3-5 lines -- not too big but enough for a little context."
See Also: → 1323438
Product: Firefox → DevTools

This is no longer an issue in new debugger.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.