We have been printing console.log() and console.error() in javascripts and using it for browser debugging, for a very long time. Now, with Visual Studio Code, we can use the same function to get an easier way to look up the Log text and Error text in Debug Window.
The usage is simple. When we need to write log message, we use the following code:
The usage is simple. When we need to write log message, we use the following code:
- console.log("This is log message");
Now, in order to get the error log message, we use the following code:
- console.error("This is error message");
The error message is displayed in red color while the simple log message is displayed in white color. This feature gives a bit of clarity when an error occurs and makes the job of the developer easier.

pooja guptaPosted Sep 8, 2016, 6:46 AM
Great
kalu singh raoPosted Jul 11, 2016, 2:32 AM
Nice...