microsoft / microsoft/vscode-java-debug

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

Abierto
#1,111 4 comentarios 0 reacciones 1 asignado Ver en GitHub

@testforstephen ya está trabajando en esto.

Desde el 19/1/2022.

ai-triaged bug question variables
Lenguaje dominante
TypeScript
Estrellas
591
Forks
429
Merge medio
1 d 9 h
PR fusionados (30 d)
19

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.