DescribeThis example shows how to include a Dojo debug console in your app. You can write information to the console to record the events that occurred and the properties that were set when the app was run. This is extremely helpful when debugging an Internet Explorer browser error. (For Firefox, Firebug provides more debugging power than the Dojo Debug
A command to display information
Console.log (); The console input page does not output
Console.info (); General Information
Console.debug (); Error-Removal information
Console.warn (); Warning Tips
Console.error (); Error tips
"Console.log ()" Can be used to replace "alert ();" or "document.write ();" For example, write "Console.log" in a Web page ("Hello World"), "and then enter it in the
What is a ConsoleThe Console is a separate window for displaying JS and DOM object information. and inject 1 console objects into JS, using this object to output information to the console window.Second what browser support ConsoleMany people may know that the Console is supported in Chrome and FireFox (FireBug). Other
Nowadays, more and more browsers have developed this tool or Javascript console, we can easily display the variables or array values in PHP code. PHP is a server-side scripting language used to develop dynamic web applications. Compared with JAVA, the absence of a good server-side debugging tool is one of its limitations. Generally, we add echo, var_dump, and other statements in PHP code to display the valu
Now, more and more browsers have developed this tool or Javascript console. With these tools, we can easily display variables or array values in PHP code.
Now, more and more browsers have developed this tool or Javascript console. With these tools, we can easily display variables or array values in PHP code.
PHP i
The above article has outlined the specific aspects of the console object as well as the basic application, here is a brief description of how to use the Chrome console this artifact to properly debug the JavaScript code (this is what we can really use to implement the place)
1, first say the source positioning
Everyone open the test page to see the bottom righ
page load completion function, then how do we know it is bound by which JS function, If we don't know the bound JS function, let alone debug it.Here's a look at how to view it, or just the test page for example, but this time we look at "Submit a review" to explain it,Right-click on "Submit Comment"--audit element, we can clearly see that this button is not bound to any events. Enter the following code inside the console panelfunction Lookevents (ele
1. What is console. log ()?In addition to some older browsers, most browsers now have built-in debugging functions. Even if there is no debugging function, you can install plug-ins to supplement it. For example, in earlier versions of Firefox, there is no built-in debugging tool. In this case, you can install the Firebug plug-in to add debugging functions. In a browser with debugging functions, a member variable named
Document directory
Multi-line and single-line JS Console
Extended reading: Interpreter and Compiler
Interactive Language
Test in the Javascript Console
Test in ironscheme
I recently read the construction and interpretation of computer programs (the second edition of the original book) and learned about the library Programming Language LISP dialect scheme
PHP is a server-side scripting language used to develop dynamic Web applications. There is no good server-side debugging tool that is one of its limitations compared to Java. Usually we are in the PHP code to add Echo, var_dump and other statements, the variable, the value of the array is displayed in the browser to achieve the purpose of debugging.
Now, more and more browsers have developed the tool or JavaScript
Nowadays, more and more browsers have developed this tool or Javascript console, we can easily display the variables or array values in PHP code. PHP is a server-side scripting language used to develop dynamic web applications. Compared with JAVA, the absence of a good server-side debugging tool is one of its limitations. Generally, we add echo, var_dump, and other statements in PHP code to display the valu
is similar to the assert in unit test. When expression is false, the following information is output, e. g:Note: The assert method is not supported in firebuglite, and chrome and firebug are supported.7. Console. Clear ()This method clears all information in the console (not supported in chrome)Eight console. dirxml (node)Print the HTML code of the HTML element,
Use console. table () to debug javascript and javascriptconsole
Use CONSOLE. LOG () to display Arrays
Imagine that you have constructed the following ArrayVar versions ages = [{Name: "JavaScript", fileExtension: ". js "},{Name: "TypeScript", fileExtension: ". ts "},{Name: "CoffeeScript", fileExtension: ". coffee "}];
c
I. Commands to display information Html>Head>Title> Common Console commandsTitle>Metahttp-equiv="Content-type"Content=head> script type= "Text/javascript" > console.log ( ' hello '); console.info ( ' information '); console.error ( ' error '); console.warn ( ' warning '); script> body> HTML> The most common is the console.log.Two: PlaceholderConsole The above concentration supports printf placeholder for
() information for output and output debug.2. console.timeStamp() Timeline information for marking the runtime.3. console.memory used to display the memory information used at the moment (this is a property rather than a method).4. console.clear() Clear the contents of the console (of course you can use the shortcut key Ctrl+l).5. The $0 page elements selected in the elements panel can be output in the console
PHP is a server-side scripting language used to develop dynamic web applications. Compared with JAVA, the absence of a good server-side debugging tool is one of its limitations. Generally, we add echo, var_dump, and other statements in PHP code to display the values of variables and arrays in the browser for debugging.Nowadays, more and more browsers have developed this tool or Javascript console. With thes
PHP is a server-side scripting language used to develop dynamic Web applications. No good server-side debugging tool is one of the limitations compared to Java. We usually add echo, var_dump, and so on in the PHP code to display the variable, the value of the array in the browser to achieve the purpose of debugging.
Now, more and more browsers have developed this tool or JavaScript console, through these t
The most common debugging tool for JavaScript is Console.info (). The console is one of the properties of the Window object in the browser, provided by the browser object Model (BOM) to access the browser console, where you can output strings, arrays, and objects that help debug your code. Console also comes with some
Tips for debugging console. log in JavaScript,
Preface
For JavaScript program debugging, compared with alert (),console.log()Is a better way, because:alert()Functions block the execution of JavaScript programs and cause side effects;
In the alert pop-up box, you need to click "OK ".console.log()Printing related informa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.