microsoft / microsoft/vscode-java-debug

toString() Object View should catch exceptions, or default to false

Open
#1,297 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug enhancement evaluation ux variables
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
  1. set a breakpoint and look at Variables View, where some variables cannot be inspected
    image
  2. set "Enable toString() Object View" to false
    image
  3. Now the variables can be expanded:
    image
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.