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

Debugging code with annotation spuriously report problem #1390

Closed
RolKau opened this issue Sep 8, 2023 · 1 comment
Closed

Debugging code with annotation spuriously report problem #1390

RolKau opened this issue Sep 8, 2023 · 1 comment

Comments

@RolKau
Copy link

RolKau commented Sep 8, 2023

Environment
  • Operating System: Ubuntu Focal 20.04.6
  • JDK version: 17.0.7
  • Visual Studio Code version: 1.82.0
  • Extensions:
    • vscjava.vscode-java-pack 0.25.13
    • vscjava.vscode-java-debug 0.54.0
    • redhat.java 1.21.0
    • vscjava.vscode-maven 0.42.0
    • vscjava.vscode-java-dependency 0.23.1
    • vscjava.vscode-java-test 0.39.1
Steps To Reproduce
  1. Unzip the attached project.zip file into an otherwise empty directory
  2. Start code bug.code-workspace
  3. Click that you trust the author of this workspace (to enable debugging)
  4. Ensure that no text editors are open for any files
  5. Observe that no problems are reported in the Problems pane
  6. Open the file src/test/java/com/example/QuxTest.java from the Explorer pane
  7. Right-click the triangular play icon next to public class QuxTest
  8. Choose Debug Test from the context menu
  9. Notice that a problem appear in the Problems pane for file Foo.java
    "The method b() is undefined for the type Mumble"
  10. Click on the problem to open file src/main/java/com/example/Foo.java
  11. Notice that the problem disappears by itself
Current Result:

Debugging of unit tests halts on an imaginary problem.

Expected Result:

Unit test should launch without any reported errors.

Additional Informations:

I reckon that this problem is related to annotation processing inserting stubs for the depended-on classes, and then these stubs aren't resolved properly. This may be a bug in the language server instead of the extension.

project.zip

@RolKau
Copy link
Author

RolKau commented Sep 15, 2023

This looked like it was caused by the debugger, but as of VSCode 1.82.2 it is also triggered when the project loads outside of the debugger, so it is moved to redhat-developer/vscode-java#3302.

@RolKau RolKau closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant