vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Classes are not automatically imported in the "Debug Console"

Open cazacugmihai opened this issue 2 years ago • 0 comments

When the code completion is used, classes are not automatically imported in the Debug Console:

Set.of(1, 2) Cannot evaluate because of compilation error(s): Set cannot be resolved.

Environment
  • Operating System: linux
  • JDK version: 19.0.1
  • Visual Studio Code version: 1.72.2
  • Java extension version: 0.25.3
  • Java Debugger extension version: 0.45.0
Steps To Reproduce
  1. Create a breakpoint in a Java class; 0

  2. When the execution is suspended, open the Debug Console and try to create a Set (e.g. Set.of(1, 2)), using the code completion feature. The aforementioned error is shown. 1

Current Result

Set.of(1, 2) Cannot evaluate because of compilation error(s): Set cannot be resolved.

2

Expected Result

ImmutableCollections$Set12@287 size=2 0: Integer@276 1: Integer@277

3

Additional Informations

This functionality works out-of-the-box in IntelliJ IDEA. It would be nice to have it also in Visual Studio Code.

cazacugmihai avatar Oct 22 '22 22:10 cazacugmihai