Is there an “immediate window” in Visual Studio Code to run Javascript?

前端 未结 5 2120
予麋鹿
予麋鹿 2020-12-28 15:02

Yes, I use F12 in the browser all the time to test out Javascript snippets with the console. I\'m tired of that (for the moment anyway).

I\'ve read that in Visual St

5条回答
  •  太阳男子
    2020-12-28 15:41

    There is no Immediate Window unlike Visual Studio in VSCode. But you can still execute Javascript in VSCode.

    Install the Code Runner Extension - https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner

    Open the JavaScript file in VSCode, then use shortcut Ctrl+Alt+N, the code will run and the output will be shown in the Output Window.

提交回复
热议问题