NEW 40336
Web Inspector: add programmatic API for setting breakpoints
https://bugs.webkit.org/show_bug.cgi?id=40336
Summary Web Inspector: add programmatic API for setting breakpoints
Jesse Hallett
Reported 2010-06-08 14:45:39 PDT
From time a bug comes up that I can only reproduce in a production environment. This leads to debugging code that is minified and that I cannot change. In situations like this it would be really helpful to be able to programmatically set breakpoints. For example setting a property on a function from the console to cause execution to pause when that function starts running would be great: > filter._onPreProcess.debug = true; It would also be handy to be able to set the value of that property to a predicate function so that execution would only pause if the predicate returned `true`: > filter._onPreProcess.debug = function(/* gets arguments sent to _onPreProcess() */) { return !!arguments[1].match(/foo/); }; There are also cases where I can modify where I believe it would be useful to have other breakpoint API options. When debugging Ruby code with the Ruby debugger I can place a call to a function called `debugger()` in my code to cause execution to pause on that line. It would be nice to have a similar option in Webkit.
Attachments
Jesse Hallett
Comment 1 2010-06-08 15:00:37 PDT
I found out that you can use the `debugger;` statement for that latter case.
Brian Burg
Comment 2 2014-11-28 19:52:50 PST
This seems like a good candidate for the console command line. Firefox's GCLI (https://github.com/mozilla/gcli/) seems to have a similar interface. There are significant challenges to making this visible to user scripts, so I think we should focus on something only made available through the inspector console.
Radar WebKit Bug Importer
Comment 3 2014-11-28 19:53:03 PST
Note You need to log in before you can comment on or make changes to this bug.