redhat-developer / redhat-developer/vscode-java

Project does not contain any main class after update to 1.26.0

未关闭
#3,467 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

After update to 1.26.0 cannot run/debug java project using spring boot dashboard in vscode.
Downgraded to 1.25.1 works fine.

Environment
  • Operating System: Windows 11
  • JDK version: graalvm-jdk-17.0.8+9.1
  • Visual Studio Code version: 1.85.1
  • Java extension version: 1.26.0
Steps To Reproduce
  1. Update to 1.26.0
  2. Run java projects either from JAVA PROJECTS tab in EXPLORER or Spring boot dashboard.

Exception appears here - https://github.com/microsoft/java-debug/blob/f8da9e2e2f55a2cefaf658ae24154c784eaa113e/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainClassHandler.java#L156

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:1725)

Current Result

Project does not contain any main class ..

Expected Result

Runs as before

Additional Informations

I have multiple projects configured with workspace file containing lauch configs

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainClassHandler.java 的第 156 行开始,然后使用报告中的环境从 Java Projects 选项卡或 Spring Boot 仪表板复现该故障。追踪为什么在更新到 1.26.0 后 LookupEnvironment.getType 不返回任何类型,并验证项目主类能够被检测到且可以启动或调试。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, spring-boot, typescript, vscode
领域
developer-experience, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。