LoginSignup
10
4

More than 3 years have passed since last update.

golang vscodeのデバッグで変数をのぞいたときに値が省略されているやつ

Posted at

... +4160 more じゃねー!

vscでブレークポイントを貼っても変数の値が省略されてしまい、内容が最後まで見られませんでした。

  • jsonとかだと全体をみたいよね
  • 省略されても嬉しくないよね

それで解決方法をggったけどなかなか見つからなかったのでメモっときます。

BEFORE

go1.png

settings.jsonを編集

「 // ← これ」のところを編集

settings.json
{
  "go.delveConfig": {
    "dlvLoadConfig": {
      "followPointers": true,
      "maxVariableRecurse": 1,
      "maxStringLen": 10000, //  これ
      "maxArrayValues": 500,
      "maxStructFields": -1
    }
  }
}

AFTER

他のdlvLoadConfigの項目については以下のリンクからどうぞ
https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code

go2.png

10
4
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
10
4