microsoft / microsoft/vscode-java-debug

Combine classpath from all projects in workspace

Open
#1,279 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Suppose you have demo.jar, which dynamically loads class Demo2, which is to be found in demo2.jar. (There are no maven dependencies between demo and demo2.)

In VSCode, it is easy to create a workspace with the code from demo and demo2, but I have not found any good way to get demo and demo2 on the same classpath when launching the application.

In theory, I could use classPaths in workspace.json/launch.json and point to demo2/target/classes + demo2's dependencies. In practice, however, that quickly gets out of hand, since you typically have many dependencies.

I have looked everywhere but haven't found any "good" solution. Is this something that is not supported?

If it isn't, maybe one could introduce another variable like "$Auto," which includes the workspace's combined classpath.

Environment
  • Operating System: macosx
  • JDK version: Java(TM) SE Runtime Environment (build 19.0.1+10-21)
  • Visual Studio Code version: Version: 1.74.2
  • Java extension version: 1.13.0
  • Java Debugger extension version: v0.47.0

Please see attached zip.
classpath-problem.zip

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

Start by inspecting how classPaths are handled for workspace.json and launch.json, using the attached classpath-problem.zip to reproduce the two-project setup. Determine how the debugger currently resolves workspace projects and dependencies; done means launching demo can automatically include demo2 and its dependencies without manually listing them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.