javascript - Is there a Firebug console -vsdoc.js? -
if not, care write one? myself...but don't have time right now...maybe next week (unless beats me it).
if are bored , want compile vsdoc:
here firebug api.
here blog post format vs doc comments intellisense.
here example vsdoc (jquery-1.4.1-vsdoc.js).
i created following because kept typing cosnole
instead of console
. can use starting point (ish).
console = { /// <summary> /// 1: javascript console /// </summary> /// <returns type="object" /> }; console.log = function (object) { /// <summary> /// write console's log /// </summary> /// <returns type="null" /> /// <param name="object" type="object"> /// write object console's log /// </param> };
there now.
i've made community wiki feel free edit , improve...
(function (window) { var console = { firebug: { /// <summary>the firebug version</summary> /// <returns type="string" /> }, log: function () { /// <summary> /// writes message console. may pass many arguments you'd like, , joined in space-delimited line. /// </summary> /// <param name="object" type="object"> /// object debug /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects debug /// </param> /// <returns type="undefined" /> }, debug: function () { /// <summary> /// writes message console, including hyperlink line called. /// </summary> /// <param name="object" type="object"> /// object debug /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects debug /// </param> /// <returns type="undefined" /> }, info: function () { /// <summary> /// writes message console visual "info" icon , color coding , hyperlink line called. /// </summary> /// <param name="object" type="object"> /// object inspect /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects /// </param> /// <returns type="undefined" /> }, warn: function () { /// <summary> /// writes message console visual "warning" icon , color coding , hyperlink line called. /// </summary> /// <returns type="undefined" /> /// <param name="object" type="object"> /// object warn /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects warn /// </param> }, error: function () { /// <summary> /// writes message console visual "error" icon , color coding , hyperlink line called. /// </summary> /// <returns type="undefined" /> /// <param name="object" type="object"> /// object display error /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects display error /// </param> }, assert: function () { /// <summary> /// tests expression true. if not, write message console , throw exception. /// </summary> /// <returns type="undefined" /> /// <param name="expression" type="expression"> /// expression test /// </param> /// <param name="expressionn" type="expression" optional="true" parameterarray="true"> /// more expressions test /// </param> }, dir: function (object) { /// <summary> /// prints interactive listing of properties of object. looks identical view see in dom tab. /// </summary> /// <returns type="undefined" /> /// <param name="object" type="object"> /// object list /// </param> }, dirxml: function (node) { /// <summary> /// prints xml source tree of html or xml element. looks identical view see in html tab. can click on node inspect in html tab. /// </summary> /// <returns type="undefined" /> /// <param name="node" type="object" domelement="true"> /// node inspect /// </param> }, trace: function () { /// <summary> /// prints interactive stack trace of javascript execution @ point called. /// stack trace details functions on stack, values passed arguments each function. can click each function take source in script tab, , click each argument value inspect in dom or html tabs. /// </summary> /// <returns type="undefined" /> }, group: function () { /// <summary> /// writes message console , opens nested block indent future messages sent console. call console.groupend() close block. /// </summary> /// <returns type="undefined" /> /// <param name="object" type="object"> /// object log /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects log /// </param> }, groupcollapsed: function () { /// <summary> /// console.group(), block collapsed. /// </summary> /// <returns type="undefined" /> /// <param name="object" type="object"> /// object log /// </param> /// <param name="objectn" type="object" optional="true" parameterarray="true"> /// more objects log /// </param> }, groupend: function () { /// <summary> /// closes opened block created call console.group() or console.groupend() /// </summary> /// <returns type="undefined" /> }, time: function (name) { /// <summary> /// creates new timer under given name. call console.timeend(name) same name stop timer , print time elapsed.. /// </summary> /// <returns type="undefined" /> /// <param name="name" type="string"> /// name of timer /// </param> }, timeend: function (name) { /// <summary> /// stops timer created call console.time(name) , writes time elapsed. /// </summary> /// <returns type="undefined" /> /// <param name="name" type="string"> /// name of timer /// </param> }, profile: function (title) { /// <summary> /// turns on javascript profiler. /// </summary> /// <returns type="undefined" /> /// <param name="title" optional="true" type="string"> /// text printed in header of profile report. /// </param> }, profileend: function () { /// <summary> /// turns off javascript profiler , prints report. /// </summary> /// <returns type="undefined" /> }, count: function (title) { /// <summary> /// writes number of times line of code count called executed. /// </summary> /// <returns type="undefined" /> /// <param name="title" optional="true" type="string"> /// title print in addition number of count /// </param> }, exception: function () { /// <summary> /// prints error message interactive stack trace of javascript execution @ point exception occurred. /// </summary> /// <returns type="undefined" /> /// <param name="errorobject" type="exception"> /// javascript exception object display /// </param> /// <param name="errorobjectn" optional="true" type="exception"> /// other javascript exception objects display /// </param> } // following functions automatically included js intellisense in vs 2010. // have been commented out. //, // hasownproperty: function () { // /// <summary>n/a</summary> // /// <returns type="boolean" /> // }, // isprototypeof: function () { // /// <summary>n/a</summary> // /// <param name="object" type="object" > // /// <returns type="boolean" /> // }, // propertyisenumerable: function () { // /// <summary>n/a</summary> // /// <param name="property" type="string" > // /// <returns type="boolean" /> // }, // tolocalestring: function () { // /// <summary>n/a</summary> // /// <returns type="string" /> // }, // tostring: function () { // /// <summary>n/a</summary> // /// <returns type="string" /> // }, // valueof: function () { // /// <summary>n/a</summary> // /// returns type="number" /> // } }; window.console = console; } (window));
Comments
Post a Comment