vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

Options for more complete Output

Open DavidTsGit opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe.

  1. I'm always frustrated when my javascript program has console.log(...) calls to log javascript objects or arrays and it lists the first 100 elements and then says ...N more items

  2. I'm also frustrated when the Output shows things like [ObjectName] or similar instead of showing the full object, beyond a certain depth or possibly under other circumstances also.

Describe the solution you'd like I understand these limits are in place for performance reasons, and possibly other reasons, but some people have faster computers than others, so some can handle more levels of depth and/or longer lists of array elements, etc. than others.

I believe these limits should be configurable in the settings. The first would be Something like: • Number of Elements to Limit Output to: (with 100 as default but we can put any number we like in here, including the option to put in 0 here for unlimited).

The second one depends. What's limiting it at the moment? When does an Object or Array list its entire contents/elements, vs just showing [ObjectName] or similar? If it's a depth level then we should be able to configure that (or use 0 for unlimited). Perhaps it's a function of how many keys it has? Something else? Whatever it is, I think we should have options to configure those limits, including 'no limits' options.

Hoping you can add these options or whatever is suitable for them! Thanks!

DavidTsGit avatar Aug 30 '20 00:08 DavidTsGit

It would be great to have this feature implemented. I'm currently using JSON.stringify to get the full object representation as a workaround like so,

JSON.stringify(myObj1, null, 2)

FatehAK avatar Apr 16 '23 11:04 FatehAK