microsoft / microsoft/vscode-java-debug
toString() Object View should catch exceptions, or default to false
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 591
- Forks
- 429
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 19
Description
When using the vscode java debugger, the experience can be really bad because some variables cannot be inspected seemingly for no reason. This gives the impression that the extension is still very buggy. It took me a long time to find out that disabling the toString() Object View solves that problem.
Likely there are exceptions thrown during toString() execution for those variables. These should either be caught, or the default for "Enable toString() Object View" should be false.
Environment
- Operating System: MacOS Ventura 13.2
- JDK version: debugee is OpenJDK Runtime Environment Homebrew (build 11.0.18+0)
- Visual Studio Code version: 1.75.1 (Universal) Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
- Java extension version: v1.14.0
- Java Debugger extension version: 0.48.0 - 2023-02-01
Steps To Reproduce
- set a breakpoint and look at Variables View, where some variables cannot be inspected

- set "Enable toString() Object View" to false

- Now the variables can be expanded:

Current Result
Some variables cannot be inspected
Expected Result
It should be possible to inspect all variables, regardless of whether their toString() method throws an exception
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file, test, or entry point; reproduce it in the Variables View with Enable toString() Object View enabled, then trace the debugger's toString() evaluation path. Done means every variable remains expandable and inspectable when its toString() throws, with the behavior covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100