Ask coding questions

← Back to all posts
console.log from script.js file in node.js repl?
EthanBlesch (8)

I have a project that I'm trying to debug, but the console is reserved for the node.js file, so I can't log easily, is there a way to fix this?

R2D2VaderBeef (8)

It looks like you are running the script within your HTML - which means it is running in your browser.
Use console.log() as normal in the script.
Open the website and press Ctrl+Shift+I (may differ in different browsers) and click on the console tab.
That should show you the console output from the script.

EthanBlesch (8)

@R2D2VaderBeef I'm on a school Chromebook that blocked ctrl shift i

R2D2VaderBeef (8)

@EthanBlesch If you can't see the browser's developer tools then unfortunately you can't really debug the JS running on the website. Try asking someone else to do it potentially.

EthanBlesch (8)

@R2D2VaderBeef would you be willing? link is, you have edit permission