From ee25365ee77004cbb02c571c26e2e73523cc51cb Mon Sep 17 00:00:00 2001 From: Laurent Nullens Date: Wed, 13 Jan 2021 07:10:07 +0100 Subject: [PATCH] chore: doc update for Delve config Add an extra section to show how to configure Delve for VS Code(expand limits) --- docs/docs/contributing-started.mdx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/docs/contributing-started.mdx b/docs/docs/contributing-started.mdx index bc18e3f2fcc7..221c5a05f46e 100644 --- a/docs/docs/contributing-started.mdx +++ b/docs/docs/contributing-started.mdx @@ -123,6 +123,26 @@ Once the extensions are installed: - Debug can be started by hitting F5. - All tests can be run using the Test explorer. +### Extra tips + +#### Configure Delve in VS Code + +[Delve](https://github.com/go-delve/delve) config is restrictive by default(string limit especially). You can expand some limits in VS Code(`settings.json` or directly in `launch.json`): +``` +"go.delveConfig": { + + "dlvLoadConfig": { + "followPointers": true, + "maxVariableRecurse": 3, + "maxStringLen": 400, + "maxArrayValues": 400, + "maxStructFields": -1 + }, + "apiVersion": 2, + "showGlobalVariables": false +} +``` + ## Up Next With everything set up, you're ready to start making changes and create your first [PR][gh-pr]!