Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not omit string when context is repl #802

Closed
ono-max opened this issue Nov 15, 2022 · 0 comments · Fixed by #805
Closed

Do not omit string when context is repl #802

ono-max opened this issue Nov 15, 2022 · 0 comments · Fixed by #805

Comments

@ono-max
Copy link
Member

ono-max commented Nov 15, 2022

We plan to support vscode debug visualizer. It sends Evaluate Request to debuggee and we need to return JSON based on vscode debug visualizer protocol. Although current debugger always tries to omit string, we don't want to omit it because JSON may be broken.

Thus, it would be good that we don't omit string when context is repl
I confirmed python debugger behaves the same way.

ko1 added a commit that referenced this issue Nov 17, 2022
Long results on DAP was clipped with 4096 chars. This patch shorten
this limit to 180 chars. Compound data structure doesn't have any
issue because expanding the result shows more details with corresponding
values such as instance variables and so on.

The problem is String object because we can not know the whole string body
if it is > 180 chars. To see the whole body this patch provides `#dump`
special field to show the whole body of the string and you can copy&paste
the value.

This patch also introduce `::DEBUGGER__::NaiveString` class. Evaluation
results of instances of this class will not be clipped so if you need to
get whole body of String, please wrap the string with `NaiveString` class.

fix #802
@ko1 ko1 closed this as completed in #805 Nov 17, 2022
ko1 added a commit that referenced this issue Nov 17, 2022
Long results on DAP was clipped with 4096 chars. This patch shorten
this limit to 180 chars. Compound data structure doesn't have any
issue because expanding the result shows more details with corresponding
values such as instance variables and so on.

The problem is String object because we can not know the whole string body
if it is > 180 chars. To see the whole body this patch provides `#dump`
special field to show the whole body of the string and you can copy&paste
the value.

This patch also introduce `::DEBUGGER__::NaiveString` class. Evaluation
results of instances of this class will not be clipped so if you need to
get whole body of String, please wrap the string with `NaiveString` class.

fix #802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant