Search code examples
meteor

Why is console.log() not printing anything?


Just getting started with Meteor, on Windows. Following the initial instructions, the automatically generated "Hello World" app is running on localhost. The text and button are there, but clicking it doesn't output anything to the console. However, replacing console.log() with alert() does show the text ("You pressed the button") in the pop-up window.


Solution

  • the console.log() output is printed in the browser. but it gets cleared immediately if you are submitting a form or handling an event as the page automatically gets refreshed.

    if you want it to work, 1.Use chrome browser 2. check "Preserve log" check box on the console. then you can see the log