Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cazacugmihai opened this issue Oct 22, 2022 · 4 comments · Fixed by microsoft/java-debug#504
Closed

Comments

@cazacugmihai
Copy link

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.

@testforstephen
Copy link
Contributor

+1
it makes sense to auto import for classes in evaluation console.

@testforstephen
Copy link
Contributor

+1 from April 2023 user feedback

@testforstephen
Copy link
Contributor

+1 from March 2023 feedback

@testforstephen
Copy link
Contributor

testforstephen commented Jul 27, 2023

+1 from June 2023 feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants