This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -sp-context:browser | |
// Open this file in scratchpad and run it. Output goes to the Browser Console (Cmd-Shift-J). | |
Components.utils.import("resource://gre/modules/devtools/dbg-server.jsm"); | |
Components.utils.import("resource://gre/modules/devtools/dbg-client.jsm"); | |
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); | |
let { StyleSheetsFront } = devtools.require("devtools/server/actors/stylesheets"); | |
let client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -sp-context:browser | |
Components.utils.import("resource://gre/modules/devtools/dbg-server.jsm"); | |
Components.utils.import("resource://gre/modules/devtools/dbg-client.jsm"); | |
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); | |
let { StyleSheetsFront } = devtools.require("devtools/server/actors/stylesheets"); | |
let client; | |
function startDebugger() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -sp-context:browser | |
// Dumps the event listeners defined in the content window of the current tab. | |
var Ci = Components.interfaces; | |
var Cc = Components.classes; | |
let eventListenerService = Cc["@mozilla.org/eventlistenerservice;1"] | |
.getService(Ci.nsIEventListenerService); | |
Cu.import("resource://gre/modules/jsdebugger.jsm"); | |
addDebuggerToGlobal(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -sp-context:browser | |
"use strict"; | |
const Cc = Components.classes; | |
const Ci = Components.interfaces; | |
const Cu = Components.utils; | |
Cu.import("resource://gre/modules/devtools/Console.jsm"); | |
let promise = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js").Promise; | |
let gMgr = Cc["@mozilla.org/memory-reporter-manager;1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change MOZCONFIG to point to a different build configuration or comment it out to use the default. | |
export MOZCONFIG=.mozconfig-opt | |
declare -i count=0 | |
result=0 | |
while [ $result -eq 0 ] | |
do | |
# Modify the next line to specify the exact mach invocation that should be tried. | |
mach mochitest-browser browser/devtools/debugger/test/browser_dbg_event-listeners.js | |
#mach xpcshell-test -d toolkit/devtools/server/tests/unit/test_dbgsocket.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Playing any sound on my SoundCloud stream produces lots of these messages in the Browser Console (using Firefox Nightly): | |
-- | |
[12:27:33.210] Firefox can't establish a connection to the server at wss://pushers.soundcloud.com/. @ https://a2.sndcdn.com/assets/sc-NxAx-a2cb4b10.js:20 | |
-- | |
[12:27:39.916] pushers.soundcloud.com:443 uses an invalid security certificate. | |
The certificate expired on 13/5/13 4:42 μ.μ.. The current time is 9/7/13 12:27 μ.μ.. | |
(Error code: sec_error_expired_certificate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo() {} | |
Foo.prototype.iterator = function() { | |
// yield 1; | |
// throw StopIteration; | |
} | |
var f = new Foo(); | |
console.log([i for (i of f)]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Ci = Components.interfaces; | |
var Cc = Components.classes; | |
let eventListenerService = Cc["@mozilla.org/eventlistenerservice;1"] | |
.getService(Ci.nsIEventListenerService); | |
let dbg = new Debugger(); | |
let DOwindow = dbg.addDebuggee(content.window); | |
let nodes = content.window.document.querySelectorAll("*"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/toolkit/devtools/debugger/server/dbg-script-actors.js b/toolkit/devtools/debugger/server/dbg-script-actors.js | |
--- a/toolkit/devtools/debugger/server/dbg-script-actors.js | |
+++ b/toolkit/devtools/debugger/server/dbg-script-actors.js | |
@@ -502,6 +502,7 @@ ThreadActor.prototype = { | |
let breakpoints = this._breakpointStore[aLocation.url]; | |
let actor; | |
+try { | |
if (breakpoints[aLocation.line].actor) { | |
actor = breakpoints[aLocation.line].actor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. $topsrcdir/browser/config/mozconfig | |
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg | |
ac_add_options --enable-debug | |
ac_add_options --enable-optimize | |
ac_add_options --enable-profiling | |
ac_add_options --with-ccache | |
ac_add_options --enable-chrome-format=symlink | |
CC=clang | |
CXX=clang++ |
NewerOlder