microsoft / microsoft/vscode-java-debug

Is there a way to see the full toString() content of a variable, including newlines?

未关闭
#1,111 4 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@testforstephen 已经在做这个了。

开始于 2022年1月19日。

ai-triaged bug question variables
主要语言
TypeScript
星标
591
派生
429
平均合并
1 天 9 小时
30 天内合并 PR
19

描述

When debugging and hoving over a variable, or watching the variable in the Variables/Watch panels, is there a way to see the full result of toString() including the newlines?

Environment
  • Operating System: Linux
  • JDK version: 1.8
  • Visual Studio Code version: 1.63.2
  • Java extension version: 1.2.0
  • Java Debugger extension version: 0.37.0
Steps To Reproduce
  1. Create an instance of a SomeClass class that has:
@Override
public String toString() {
    return "toto\ntiti";
}
  1. Add a breakpoint on a line where you can hover the instance to inspect it.
Current Result

The popup debug window displays: SomeClass@123 "toto

Expected Result

The popup debug window displays:

SomeClass@123 
"toto
titi"
Additional Informations

This can especially useful when the toString() result is something like a JSON object that is human friendly formatted.

Ideally the full result would be in a zone where it could be easily copied!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。