Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I print debug messages in the Google Chrome JavaScript Console?

How do I print debug messages in the Google Chrome JavaScript Console?

Please note that the JavaScript Console is not the same as the JavaScript Debugger; they have different syntaxes AFAIK, so the print command in JavaScript Debugger will not work here. In the JavaScript Console, print() will send the parameter to the printer.

like image 925
Tamas Czinege Avatar asked Oct 20 '08 10:10

Tamas Czinege


1 Answers

Executing following code from the browser address bar:

 javascript: console.log(2); 

successfully prints message to the "JavaScript Console" in Google Chrome.

like image 117
Sergey Ilinsky Avatar answered Sep 30 '22 02:09

Sergey Ilinsky