Reputation: 1
I tried everything and amazingly I couldn't find a way to do such a simple thing- show inside Atom
the logs of my program.
console.log(" just a simple log")
if you go to view->developer->toggle developer tools
a Chrome like console will be open, but log will not be displayed, and its not a good UI.
Tried to install any kind of package output-panel
, console
, console-log
none of them will show my logs.
If I open the index.html
in Chrome
I see all my logs as expected.
Why I can't see a simple log ?
Upvotes: 0
Views: 3138
Reputation:
I know i'm late, but Install "Script" by atom in the package installer and it supports almost all languages so just press cmd+I for Mac and ctrl+I for Windows.
Edit: This is only for running script inside of the Atom-editor, if you have linked it to a web then this is unnecessary.
Upvotes: 0
Reputation: 13
I had the same problem and I figured it out myself. You really don't need an Atom JS console to see the results of your console.log commands as long as your program runs in a browser's window. You only need the console window that is already embeded in your browser. Here is how to do it:
Now each time your javascript code executes a console.log command the result will be displayed in the console window.
Upvotes: 0
Reputation: 138277
The console you see is atom's console. Atom is written in JavaScript itself, with the console you can debug the editor, plugins etc. You won't see the log you've written, because no one executes your code. If you open the script as part of a webpage in Chrome, Chrome executes the script.
You could use the script plugin to run the file directly from within atom.
Upvotes: 1