LoginSignup
29
31

More than 5 years have passed since last update.

Visual Studio CodeでNode.js触ってみた

Posted at

ちまたで話題になっているようなので早速いれて手持ちの適当なコードを開いてみました。

画面はこんな感じ

スクリーンショット 2015-04-30 21.24.06.png

デバッグしてみる

スクリーンショット 2015-04-30 21.26.56.png

  • 起動したら自動でデバッグの実行設定用のJsonが作成されました。
  • configurationsの中に複数のDebug設定を書き込めて、起動時に選べます。
{
    "version": "0.1.0",
    // List of configurations. Add new configurations or edit existing ones.  
    // ONLY "node" and "mono" are supported, change "type" to switch.
    "configurations": [
        {
            // Name of configuration; appears in the launch configuration drop down menu.
            "name": "Launch app.js",
            // Type of configuration. Possible values: "node", "mono".
            "type": "node",
            // Workspace relative or absolute path to the program.
            "program": "app.js",
            // Automatically stop program after launch.
            "stopOnEntry": true,
            // Command line arguments passed to the program.
            "args": [],
            // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
            "cwd": ".",
            // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
            "runtimeExecutable": null,
            // Environment variables passed to the program.
            "env": { }
        }
    ]
}

  • listen開始したら問題無くNodeのサーバーが立ち上がりました。

スクリーンショット 2015-04-30 21.31.23.png

  • しかし、MacでVisual Studioというのは不思議な感じ・・・
29
31
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
31