Skip to content

Feature: Add possibility to configure max string/bytes limits for on-demand content loading for debug #3795

@crisperit

Description

@crisperit

Is your feature request related to a problem? Please describe.
I'm working on a huge payload which comes as []byte and sometimes is visible as a string
According to a https://github.com/golang/vscode-go/blob/master/docs/debugging.md#i-need-to-view-large-strings-how-can-i-do-that-if-dlvloadconfig-with-maxstringlen-is-deprecated the max limit for on-demand is 4096

For me using newest adapter is a bit useless as I constantly am hitting the limit and I need to create bunch of Println which is rather not sth that should be done..

Describe the solution you'd like
I agree that 1 wide setting wasn't a good idea. I really like on-demand idea. But the perfect would be imo on-demand configurable max idea

So I would like to have the same config that was on legacy

maxStringLen: Maximum number of bytes read from a string (default: 64).
maxArrayValues: Maximum number of elements read from an array, slice, or map (default: 64).
maxStructFields: Maximum number of fields read from a struct. A setting of -1 indicates that all fields should be read (default: -1).
maxVariableRecurse: How far to recurse when evaluating nested types (default: 1).
followPointers: Automatically dereference pointers (default: true).

That config would apply only to on demand feature instead of hardcoded 4096

Not sure if that's possible but it's definitely mine biggest pain regarding debugging a golang code in VSCode

Describe alternatives you've considered
Well.. alternative would be to load all without any limits on-demand

Metadata

Metadata

Assignees

No one assigned

    Labels

    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions