devtool to replace existing tools such as Nodemon.--watchThis command will be launched in the console of the Chrome Developer tool, and the app.js --watch files we saved will be re-loaded (automatically) to the console via the parameters.By clicking app.js:1 on the link, the program will take Sources us to the relevant line in the tag.In the Sources tag, you can also tap the Cmd/Ctrl + P button to quickly
for the node. JS installation It is easy to find the corresponding computer version directly to install it, so far as you know, without any configuration. once installed, you will have node. js Command prompt running the program directly. then you can create the first applet, create a file directly in a folder, such as
Usually when we write the node. JS program, we are accustomed to use Console.log print log information, but this is limited to the console output, sometimes we need to output information to the log file, in fact, using the console can also achieve this goal, today to briefly introduce.We first create the following file
Node. js is based on Google V8, and Google V8 has an Eclipse debugging plug-in that also supports node. js.
1. Install Eclipse debugger for V8
This should be known to anyone who has used Eclipse, but let's simply put it:
Select "Install New Software"
Click "Add"
Location: http://chromedevtools.googlecode.com/s
It seems that fs. watchfile is not supported in Windows. I don't want to use iis node, so I spent some time writing a tool to help debug.
This tool can do the following:
Monitors changes to all subdirectories in the main js file. restarts the Node process after changes are made.
Logs can be output to this tool for view
good News: Now we can debug node. js with our browser!!!Premise
node. js 6.3+, which can be downloaded on the node. JS website;
Chrome 55+. If your local chrome is upgraded
Using Webstrom can easily debug the Node applcation.For example, we had an node+express application.Server.js:/**/' use strict '; var expres = require (' Express '); var app = expres (); App.get (function(request, Response) { response.send (200 , "Hello World"); App.listen (3000);All it does just send back a "Hello world" string.What we want are to see how to
Debugging node. js with Chrome DevToolshttps://nodejs.org/en/docs/guides/debugging-getting-started/1.PS c:\users\clu\documents\nodeapp\test> node--inspect. \app.jsDebugger listening on WS://127.0.0.1:9229/34C03922-857B-4E6D-82CF-30DBF27A76FFFor help, See:https://nodejs.org/en/docs/inspectorServer running at Http://127.0.0.1:3000/2. Open the About:inspect in the C
VS code is a Microsoft produced a cross-platform of the lightweight editor, I do not advertise, want to know their own to search it, in short I like it.: https://code.visualstudio.com/Installation is completed should be automatically added to the environment variables, do not remember, if you do not add the environment variable. Installation finished directly see version:VS code opens the site created in the previous article Rc_web (optional below)
Direct desktop shortcut icon launches vs
The effect of the following figure
The PHP console is a chrome plug-in that can help users simulate the actual PHP Web environment and help users debug PHP code using the Chrome plugin, and after the user has installed the PHP console plugin in Chrome, You can reference the PHP console project code in your own PHP p
(); Console.group ("Start of the second group");Console.log ("The first of the second group"); Console.log ("second group, second article"); console.groupend ();The Console.group () command is used to start the grouping, and Console.groupend () is used to end the grouping.(3) Object outputConsole.dir () is a specialized output of all methods and properties of an object, so we can view the object's information without having to traverse it ourselves:var obj = { "haha", "Doubi"};console.dir
);
// Output a String to the console once the server starts up, lew.us know everything// Starts up correctlyConsole. log ("Random Number Generator Running ...");
Start the application
Put the above code into a file named "random. js. To start the application and run it (to create an HTTP server and listen to connections on port 80), enter the following command in your command prompt: %
1. What is console?Console is a separate window used to display JS and DOM object information. And inject a console object to Js.You can output information to the console window.2. What browsers support console?Many people may kno
1. What is console?Console is a separate window used to display JS and DOM object information. And inject a console object to Js.You can output information to the console window.2. What browsers support console?Many people may kno
A chance, open Baidu when pressed the F12, and then see the console inside the output of Baidu recruitment ads, feeling pretty handsome, and then have this blog.
Since you can do this in the console output information, then debug JS after the time can not save a lot of trouble! Avoid fraught, intentionally using the f
[, Object, ...])The Assert method is similar to assertions in unit tests, and when expression is false, output the following information, e.g: note: The Assert method is not supported in Firebuglite, Chrome and FireBug supportSeven Console.clear ()This method clears all information in the console (not supported in chrome)Eight Console.dirxml (node)Print HTML code for HTML elements, equivalent to log.Nine Co
Debugging Angularjs apps in the consoleOne tricky issue when creating angularjs apps is how to access the data and services that are hidden in the app in Chrome,firefox, as well as in the JavaScript console of IE. This article will show you some tips on how to monitor and control ANGULARJS applications from the JavaScript console to help you make it easier to test changes to ANGULARJS in real time.1: Access
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
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.