Skip to content

Classes are not automatically imported in the "Debug Console" #1246

@cazacugmihai

Description

@cazacugmihai

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.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions