vscode-java-debug
vscode-java-debug copied to clipboard
Define custom "toString()" in variables view
Eclipse has a functioality to setup a custom "toString" method (called "Detail Formatter") on each type in the variables view. This is handy when you have objects that don't come with a nice toSring method. It allows you to directly show the useful information.
Example details formatter: getName() + ": " + getBirthDate()
Environment
- Operating System: macOS 10.12.6 (16G1212)
- JDK version: 1.8.0_144-b01
- Visual Studio Code version: 1.20.0 (1.20.0)
- Java extension version: 0.18.1
- Java Debugger extension version:0.6.0

@mojo2012 thank you for reporting this issue. Now the debugger supports expression evaluation. So if you type the body of the formatter in Watch panel, it will evaluate. Can it address the issue?
That's not the same actually. The "detail formatter" feature is persistent across debug sessions. The expression view can be deleted at any point, losing the "body". Futhermore it would kinda "duplicate" the variable.
something like this would be amazing: natvis