Skip to content

When debugging in VSCode, maven dependencies with "test-scope" are not available #540

@Frickeldave

Description

@Frickeldave

Describe the bug
When i debug a maven based java application in VSCode the dependencies which are defined in the "test-scope" are not loaded and therefore it is not possible to debug an application when a component is needed which is marked for the test-scope. A workaround is to remove the test-scope, but then it is also part of my productive deployment which is not my goal. Another workaround is probably using maven profiles. But this increased the complexity.

To Reproduce
Steps to reproduce the behavior:

  1. Create a maven based project
  2. Create the H2 dependeny with scope test e.g.
com.h2database h2 1.4.200 test 3. Create an application (e.g. spring boot) which use H2 (example is [here](https://github.com/Frickeldave/fleckerlteppich_telemetry)) 4. Run debug 5. Application will fail when connecting

Expected behavior
A switch/option/setting to define the maven scope when debugging an application.

Environments (please complete the following information as much as possible):

  • OS: Windows 10
  • VS Code version: 1.48.2
  • Extension version Java extension pack 0.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions