Skip to content

Commit

Permalink
Improve tracing + include setTimeout and setInterval in dynamic scrip…
Browse files Browse the repository at this point in the history
…t list
  • Loading branch information
janodvarko committed Mar 11, 2014
1 parent 7e90952 commit f2f4cdb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
17 changes: 14 additions & 3 deletions extension/content/firebug/debugger/breakpoints/breakpointTool.js
Expand Up @@ -5,10 +5,11 @@ define([
"firebug/lib/trace",
"firebug/lib/object",
"firebug/chrome/tool",
"firebug/debugger/debuggerLib",
"firebug/debugger/breakpoints/breakpointStore",
"firebug/remoting/debuggerClient",
],
function (Firebug, FBTrace, Obj, Tool, BreakpointStore, DebuggerClient) {
function (Firebug, FBTrace, Obj, Tool, DebuggerLib, BreakpointStore, DebuggerClient) {

// ********************************************************************************************* //
// Constants
Expand Down Expand Up @@ -256,8 +257,18 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
return;
}

Trace.sysout("breakpointTool.setBreakpoint; " + url + " (" + lineNumber + ") " +
"thread state: " + thread.state);
if (Trace.active)
{
Trace.sysout("breakpointTool.setBreakpoint; " + url + " (" + lineNumber + ") " +
"thread client state: " + thread.state);

// xxxHonza: I have experienced a problem where the client side state
// was set to "paused", but the server side still failed to set a breakpoint
// due to debugger not being in pause state.
var threadActor = DebuggerLib.getThreadActor(this.context.browser);
Trace.sysout("breakpointTool.setBreakpoint; thread actor state: " +
threadActor.state);
}

// Do not create two server side breakpoints at the same line.
var bpClient = this.getBreakpointClient(url, lineNumber);
Expand Down
8 changes: 2 additions & 6 deletions extension/content/firebug/debugger/script/sourceTool.js
Expand Up @@ -53,8 +53,8 @@ var dynamicTypesMap = {
"Function": CompilationUnit.EVAL,
"eventHandler": CompilationUnit.BROWSER_GENERATED,
"scriptElement": CompilationUnit.EVAL,
//"setTimeout": CompilationUnit.EVAL,
//"setInterval": CompilationUnit.EVAL
"setTimeout": CompilationUnit.EVAL,
"setInterval": CompilationUnit.EVAL
};

// ********************************************************************************************* //
Expand Down Expand Up @@ -488,8 +488,6 @@ var originalBuildStackFrame = StackFrame.buildStackFrame;
*/
function buildStackFrame(frame, context)
{
Trace.sysout("sourceTool.buildStackFrame;", frame);

var stackFrame = originalBuildStackFrame(frame, context);

var threadActor = DebuggerLib.getThreadActor(context.browser);
Expand All @@ -504,8 +502,6 @@ function buildStackFrame(frame, context)
if (!sourceFile)
return stackFrame;

Trace.sysout("sourceTool.buildStackFrame; SourceFile", sourceFile);

if (sourceFile)
{
// Use proper source file that corresponds to the current frame.
Expand Down

0 comments on commit f2f4cdb

Please sign in to comment.