Skip to content

Fix Save Value to File for large debugger strings (#9452)#9534

Open
kamilkrzywanski wants to merge 1 commit into
apache:masterfrom
kamilkrzywanski:fix-9452-save-value-to-file
Open

Fix Save Value to File for large debugger strings (#9452)#9534
kamilkrzywanski wants to merge 1 commit into
apache:masterfrom
kamilkrzywanski:fix-9452-save-value-to-file

Conversation

@kamilkrzywanski

Copy link
Copy Markdown
Contributor

Summary

  • Keep shortened-string metadata in a strong HashMap so getShortenedInfo() still resolves after GC (previously a WeakHashMap could drop the entry while the truncated ... display value was still shown).
  • Also resolve quoted Variable.getValue() forms ("content...") when looking up shortened info.
  • Fixes Save Value to File writing only the first 100k characters plus ... instead of streaming the full remote string via StringInfo.getContent().

Fixes #9452

Test plan

  • Debug an app with a String larger than 100_000 characters
  • Open the variable custom editor (...) and choose Save Value to File
  • Confirm the saved file length matches the full string (no trailing truncation ellipsis)

Standalone verification of the lookup failure mode:

  • With WeakHashMap, after GC of the map key, lookup of an equal display string returns null → save would write the truncated preview
  • With HashMap, lookup still succeeds → save can use getContent()

Keep shortened-string metadata in a strong map and resolve quoted
Variable.getValue() forms so Save can stream the full remote content
instead of the truncated 100k+"..." preview.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Save Value to File" if > 100kB broken

1 participant