Index: Source/core/inspector/InjectedScriptSource.js |
diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js |
index 0cffd8726f444e947f1a73c93f5c1a98ee00b2d0..9e2b2bb4d92e097a3e28197a715a1cfe0ac81262 100644 |
--- a/Source/core/inspector/InjectedScriptSource.js |
+++ b/Source/core/inspector/InjectedScriptSource.js |
@@ -1154,7 +1154,7 @@ function CommandLineAPI(commandLineAPIImpl, callFrame) |
CommandLineAPI.members_ = [ |
"$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd", |
"monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventListeners", |
- "debug", "undebug", "table" |
+ "debug", "undebug", "monitor", "unmonitor", "table" |
]; |
/** |
@@ -1313,12 +1313,25 @@ CommandLineAPIImpl.prototype = { |
debug: function(fn) |
{ |
- InjectedScriptHost.setBreakpoint(fn); |
+ InjectedScriptHost.setDebugBreakpoint(fn); |
}, |
undebug: function(fn) |
{ |
- InjectedScriptHost.removeBreakpoint(fn); |
+ InjectedScriptHost.removeDebugBreakpoint(fn); |
+ }, |
+ |
+ monitor: function(fn) { |
+ if (typeof fn != "function") |
+ return; |
+ |
+ var details = InjectedScriptHost.functionDetails(fn); |
vsevik
2013/06/10 15:06:01
Looking at this piece of code I think that you don
SeRya
2013/06/11 08:24:12
Now I use results of InjectedScriptHost.functionDe
|
+ var name = details.name || details.inferredName || "(anonimous function)"; |
+ InjectedScriptHost.setMonitorBreakpoint(fn, "console.log('function " + name + " called' + (arguments.length > 0 ? ' with arguments: ' + Array.prototype.join.call(arguments, ', ') : '')) && false"); |
vsevik
2013/06/10 15:06:01
Please don't use single quotes in blink.
SeRya
2013/06/11 08:24:12
Replaced by \"
|
+ }, |
+ |
+ unmonitor: function(fn) { |
+ InjectedScriptHost.removeMonitorBreakpoint(fn); |
}, |
table: function() |