LoginSignup
2
2

More than 5 years have passed since last update.

Visual Studio Code で Go 言語を引数付きでデバッグする方法

Posted at
  1. [デバッグ]→[構成を開く]を選択する。
  2. lanuch.json が起動する
  3. 以下のように "args" というパラメータを設定する。String 型の配列として記述する。
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${fileDirname}",
            "env": {},
            "args": ["-logdir", ".\\log", "choice.exe", "hoge2", "hoge3" ,"hoge4"]
        }
    ]
}
2
2
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
2
2