Skip to content

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

Description

@crisperit

Context
I've read the issue golang/vscode-go#1318 and I'd like to go back to a topic of truncating the long strings..

And in mine case these limits are not sufficient so as @polinasok said in golang/vscode-go#1318 (comment) I'm letting you know :D

I'm working on a huge payload which comes as []byte and sometimes is visible as a string
According to a

maxSingleStringLen = 4 << 10 // 4096
and
loadCfg.MaxStringLen = maxSingleStringLen

it's not possible to change it via the config.

I'm using VSCode extension and created topic there (golang/vscode-go#3795 (comment))
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..

Requested feature description
I like the idea of having different limits depends on context - it's good for the performance. But the hardcoded logic limits are sth bad.
I would like to have on-demand configurable max idea

I would like to be able to configure different kind of limits (but only for on-demand) context

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions