microsoft / microsoft/vscode-java-debug

Debugger mistakenly included Gradle build folder in classpaths

Open
#1,315 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

  1. Open spring-petclinic project using VS Code with Java Ext Pack installed
  2. When hint to choose between Maven or Gradle, pick Gradle and import the project
  3. In terminal, build the project using gradle by ./gradlew build
  4. Now launch the project, and inspect the argfile

Both bin and build folders are in the classpath, and it will introduce unexpected consequences.

For example, in the spring-petclinic project, the database initialization script will be executed twice due to the extra classpath entry, resulting in duplicated records in db. This is really hard to troubleshoot and will cause serious confusion.

build folder should not be included in this case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the spring-petclinic project: select Gradle, run ./gradlew build, launch the project, and inspect the argfile. Trace the classpath handling that adds the bin and build folders; done means the build folder is absent from the generated classpath and the duplicate database initialization no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
build-system, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.