SANGBEUM DO
SANGBEUM DO

Reputation: 19

Javascript console.log is not printed on vscode

enter image description here

I just started to learn JS and was trying to printout "Hello,World" the basic.

However,

[Running] and [Done] messages were printed properly but not for the text "Hello,World".

According to other "hello,world" sources from tutorials and documents, "console" was colored with different color except white. Is this point related to this printout problem?

Upvotes: 0

Views: 6456

Answers (3)

user21022428
user21022428

Reputation: 1

Open terminal and type node filename.js and run it

Upvotes: 0

siddhant sharma
siddhant sharma

Reputation: 36

You can debug with external terminal by configuring launch.json (you need to place your file inside a folder to do configuration).

Go to Debug -> Open Configurations

Add "console": "externalTerminal" to your launch.json:

"version": "0.2.0",
"configurations": [
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "program": "${workspaceFolder}/t.js",
        "console": "externalTerminal"
    }
]

Try Debugging and VSCode will debug your output on a separate terminal.

Upvotes: 2

Arslan
Arslan

Reputation: 67

you need to switch your terminal tab to see the console , its the last one normally

Upvotes: 1

Related Questions