vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Automatically add module information to launch config

Open tobiasdiez opened this issue 4 years ago • 0 comments

When using a gradle project which is modularized, the launch configuration needs to include proper add-modules arguments for each dependency in order for the compilation to work. These should be automatically added by vscode-java.

Environment
  • Operating System: Win 10
  • JDK version: 14
  • Visual Studio Code version: 1.47
  • Java extension version: 0.27.1 (debugger)
Steps To Reproduce
  1. Open modularized project that uses gradle
  2. Create default "Launch" config
  3. Try to run the project

Sample project: JabRef

Current Result

Errors because dependency modules are not found.

Expected Result

Automatically add add-modules statements to the java compiler so that dependencies are found.

Additional Informations

In addition, it would be good if the configuration of org.beryx.jlink is automatically recognized and the right add-opens and add-exports cmd args are added: https://github.com/JabRef/jabref/blob/00a4fb2136a573e1c6c34fc7b5c779b2d88d9636/build.gradle#L387-L423

tobiasdiez avatar Jan 01 '21 16:01 tobiasdiez