1 var MAX_DUMP_DEPTH = 1;
2 function dump_obj_r(obj, name, indent, depth) {
3 if (depth > MAX_DUMP_DEPTH) {
4 return indent + name + ": <Maximum Depth Reached>\n";
6 if (typeof obj == "object") {
8 var output = indent + name + "\n";
15 child = "<Unable to Evaluate>";
17 if (typeof child == "object") {
18 output += dump_obj(child, item, indent, depth + 1);
20 output += indent + item + ": " + child + "\n";
29 function dump_obj (obj, name) {
30 if (typeof obj == "object") {
32 var output = name + "\n";
38 child = "<Unable to Evaluate>";
40 output += item + ": " + child + "\n";
49 * This simple facility can be used to execute arbitrary expression in the context of some point that you'd like to debug.
50 * At that point, simply set some global variable to the result of: eval(DEBUG_HERE);
51 * For example: conkeror.my_debug_ref = eval(DEBUG_HERE);
52 * Then if you call: conkeror.my_debug_ref("some expression"), the specified expression is evaluated in the context
53 * at which eval(DEBUG_HERE) was called.
55 * Note that the unusual identifier __DEBUG_HERE is simply used to
56 * avoid clobbering any identifiers that you might want to examine in
59 const DEBUG_HERE = "function (__DEBUG_HERE) { return eval(__DEBUG_HERE); }";