Index: mozilla/extensions/venkman/resources/content/venkman-commands.js =================================================================== RCS file: /cvsroot/mozilla/extensions/venkman/resources/content/venkman-commands.js,v retrieving revision 1.43 diff -p -u -6 -r1.43 venkman-commands.js --- mozilla/extensions/venkman/resources/content/venkman-commands.js 25 Jun 2006 21:01:25 -0000 1.43 +++ mozilla/extensions/venkman/resources/content/venkman-commands.js 9 Aug 2006 18:11:58 -0000 @@ -150,12 +150,13 @@ function initCommands() /* aliases */ ["exit", "quit", 0], ["save-default-layout", "save-layout default", 0], ["profile-tb", "profile toggle", 0], ["this", "props this", CMD_CONSOLE], ["toggle-chrome", "chrome-filter toggle", 0], + ["toggle-forcescriptload", "toggle-pref profile.forceScriptLoad", 0], ["toggle-ias", "startup-init toggle", 0], ["toggle-pprint", "pprint toggle", 0], ["toggle-profile", "profile toggle", 0], ["toggle-save-layout", "toggle-pref saveLayoutOnExit", 0], ["toggle-save-settings", "toggle-pref saveSettingsOnExit", 0], ["em-cycle", "emode cycle", 0], Index: mozilla/extensions/venkman/resources/content/venkman-menus.js =================================================================== RCS file: /cvsroot/mozilla/extensions/venkman/resources/content/venkman-menus.js,v retrieving revision 1.19 diff -p -u -6 -r1.19 venkman-menus.js --- mozilla/extensions/venkman/resources/content/venkman-menus.js 25 Jun 2006 21:01:25 -0000 1.19 +++ mozilla/extensions/venkman/resources/content/venkman-menus.js 9 Aug 2006 18:11:59 -0000 @@ -180,12 +180,16 @@ function initMenus() label: MSG_MNU_PROFILE, items: [ ["toggle-profile", {type: "checkbox", checkedif: "console.jsds.flags & COLLECT_PROFILE_DATA"}], + ["toggle-forcescriptload", + {type: "checkbox", + checkedif: "console.prefs['profile.forceScriptLoad']"}], + ["-"], ["clear-profile"], ["save-profile"], ["show-profile"] ] }; Index: mozilla/extensions/venkman/resources/content/venkman-profiler.js =================================================================== RCS file: /cvsroot/mozilla/extensions/venkman/resources/content/venkman-profiler.js,v retrieving revision 1.8 diff -p -u -6 -r1.8 venkman-profiler.js --- mozilla/extensions/venkman/resources/content/venkman-profiler.js 16 May 2006 19:28:32 -0000 1.8 +++ mozilla/extensions/venkman/resources/content/venkman-profiler.js 9 Aug 2006 18:11:59 -0000 @@ -38,12 +38,13 @@ * ***** END LICENSE BLOCK ***** */ function initProfiler () { var prefs = [ + ["profile.forceScriptLoad", false], ["profile.template.xml", "chrome://venkman/locale/profile.xml.tpl"], ["profile.template.html", "chrome://venkman/locale/profile.html.tpl"], ["profile.template.csv", "chrome://venkman/locale/profile.csv.tpl"], ["profile.template.txt", "chrome://venkman/locale/profile.txt.tpl"], ["profile.ranges.default", "1000000, 5000, 2500, 1000, 750, 500, " + "250, 100, 75, 50, 25, 10, 7.5, 5, 2.5, 1, 0.75, 0.5, 0.25"] @@ -356,13 +357,13 @@ function pro_rptall (profileReport) else { if (hadData) { ++sectionCount; console.status = getMsg(MSN_PROFILE_SAVING, [i, last]); - setTimeout (generateReportChunk, 10, i); + setTimeout (generateReportChunk, 10, i); } else { generateReportChunk (i); } } @@ -382,13 +383,35 @@ function pro_rptall (profileReport) if ("reportHeader" in reportTemplate) file.write(replaceStrings(reportTemplate.reportHeader, reportData)); var length = profileReport.scriptInstanceList.length; var last = length - 1; - generateReportChunk (0); + // If the user asks for it, load all scripts so we can guess function names + if (console.prefs["profile.forceScriptLoad"]) + { + function loadedScript(status) + { + if (++scriptsLoaded == length) + generateReportChunk(0); + }; + + var scriptsLoaded = 0; + for (var j = 0; j < length; j++) + { + var src = profileReport.scriptInstanceList[j].sourceText; + if (!src.isLoaded) + src.loadSource(loadedScript); + else + ++scriptsLoaded; + } + } + else + { + generateReportChunk(0); + } } console.profiler.loadTemplate = function pro_load (url) { var lines = loadURLNow(url); Index: mozilla/extensions/venkman/resources/locale/en-US/venkman.properties =================================================================== RCS file: /cvsroot/mozilla/extensions/venkman/resources/locale/en-US/venkman.properties,v retrieving revision 1.64 diff -p -u -6 -r1.64 venkman.properties --- mozilla/extensions/venkman/resources/locale/en-US/venkman.properties 25 Jun 2006 21:01:25 -0000 1.64 +++ mozilla/extensions/venkman/resources/locale/en-US/venkman.properties 9 Aug 2006 18:12:01 -0000 @@ -836,12 +836,14 @@ cmd.set-eval-obj.help = Sets the curre cmd.scan-source.label = &Scan For Meta Comments cmd.scan-source.params = cmd.scan-source.help = Scans the entire source file for comments in the form //@JSD_DIRECTIVE. By default, the directives recognized are //@JSD_LOG, //@JSD_BREAK, and //@JSD_EVAL. JSD_LOG evaluates whatever script follows it, logging the result to the Interactive Session view. JSD_BREAK inserts a conditional breakpoint a the next executable line. JSD_EVAL evaluates whatever script follows it, without logging or breaking. Users can add additional directives with plug ins. cmd.scope.help = Lists the properties of the topmost object in the scope chain for the current frame. +cmd.toggle-forcescriptload.label = &Force function name guessing + cmd.toggle-functions.label = Include &Functions cmd.show-functions.params = [] cmd.show-functions.help = Controls whether or not function properties (sometimes referred to as methods) will be displayed in the Local Varables and Watch views. After changing this value, you will need to close and open affected nodes in order to see the change. The value of can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If is not provided, the current state will be displayed. cmd.toggle-ecmas.label = &Include ECMA Properties