Skip to content

Run & Debug Multi-Module Dropwizard Application in VSCode #1443

Closed

Description

@TeddyCr

I have the following dropwizard app: https://github.com/open-metadata/OpenMetadata, which I am trying to run in debug mode in VS Code. I have tried a few setup of my launch.json file including a recommendation from this SO post How to debug a java dropwizard app using Visual Studio Code.

My launch.json file is configured as show below.

{
    "type": "java",
    "name": "Debug (Launch)-OpenMetadataApplication<openmetadata-service>",
    "request": "launch",
    "cwd": "${workspaceFolder}",
    "console": "internalConsole",
    "stopOnEntry": false,
    "mainClass": "org.openmetadata.service.OpenMetadataApplication",
    "classPaths": [
        "path/to/OpenMetadata/openmetadata-dist",
    ],
    "projectName": "openmetadata-service",
    "args": ""
},
{
    "type": "java",
    "name": "Debug (Attach)",
    "request": "attach",
    "hostName": "localhost",
    "port": 8000
},

I have also tried a simpler config specifying just the classpath and the main class and trying to launch the app directly from the debugger (vs launching it first with the mvn debugger and then attaching to it through VS Code debugger). This yields the same error.

{
    "type": "java",
    "name": "Debug (Launch)-OpenMetadataApplication<openmetadata-service>",
    "request": "launch",
    "cwd": "${workspaceFolder}",
    "mainClass": "org.openmetadata.service.OpenMetadataApplication",
    "classPaths": [
        "/path/to/OpenMetadata/openmetadata-dist",
    ],
    "projectName": "openmetadata-service",
    "args": ""
},

When running the debugger I get a OpenMetadataApplication class not found error. As comparison I am able to successfully run the app in debug mode using IntelliJ -- see screenshot below for IntelliJ config.

I can also run the simple application from the Getting Started dropwizard documentation.

Questions

  • Is it possible to run this kind of multi-module application in VS Code
  • If yes, what pieces am I missing from my launcher config

Thank you for your help, this would be awesome and allow me to only use VS Code 😊

Environment
  • Operating System: Mac OS Sonoma
  • JDK version: 17 (the screenshot says 11 but the project recently moved to 17)
  • Visual Studio Code version: 1.86.1
  • Java extension version: Extension Pack for Java v0.25.15
  • Java Debugger extension version: v0.56.1
Steps To Reproduce
  1. Clone the repository at https://github.com/open-metadata/OpenMetadata
  2. Setup the launcher.json to start the dropwizard application in debug mode
Current Result

Application fails to start and VS Code throws a OpenMetadataApplication class not found error

Expected Result

Application will start correctly in debug mode allowing me to set brekpoints in the application code.

Additional Informations

Before starting the application you will need to:

  1. compile the project mvn clean install -DskipTests from the root folder
  2. generate Python class from json-schema make generate from the root folder
  3. start the application in docker cd docker/development/ && docker compose up -d --build
  4. stop the server in the compose service and start the server in debug mode from VSCode

Activity

  1. changed the title [-]Run & Debug Multi-Module Dropwizard Application [/-] [+]Run & Debug Multi-Module Dropwizard Application in VSCode[/+] on Feb 21, 2024
  2. github-actions commented on Nov 10, 2025

    @github-actions

    Hi Teddy (@TeddyCr), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Use the Java extension’s automatic classpath resolution instead of manually listing jars, and make sure the Dropwizard “server” arguments are passed. For example:

    {
      "type": "java",
      "name": "Debug OpenMetadata",
      "request": "launch",
      "projectName": "openmetadata-service",                   // match the module name shown under Java Projects
      "mainClass": "org.openmetadata.service.OpenMetadataApplication",
      "args": [
        "server",
        "${workspaceFolder}/openmetadata-service/src/main/resources/openmetadata.yml"
      ]
    }

    • Remove classPaths so VS Code will include target/classes and all runtime dependencies automatically.
    • Make sure the “openmetadata-service” module is imported as a Java project (check the Java Projects view).

    References:

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  3. TeddyCr commented on Nov 25, 2025

    @TeddyCr
    Author

    I was able to resolve the issue using the following launch.json config

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "type": "java",
                "name": "OpenMetadata [MySQL]",
                "request": "launch",
                "mainClass": "org.openmetadata.service.OpenMetadataApplication",
                "args": "server ./conf/openmetadata.yaml",
                "classPaths": [
                    "${workspaceFolder}/openmetadata-dist/target/libs/*"
                ],
                "sourcePaths": [
                    "${workspaceFolder}/openmetadata-service/src/main/java",
                    "${workspaceFolder}/openmetadata-spec/src/main/java",
                    "${workspaceFolder}/openmetadata-service/src/main/resources",
                    "${workspaceFolder}/common/src/main/java"
                ],
                "env": {
                    "ELASTICSEARCH_CLUSTER_ALIAS": "openmetadata",
                    "PIPELINE_SERVICE_IP_INFO_ENABLED": "true",
                    "SERVER_HOST_API_URL": "http://host.docker.internal:8585/api",
                },
                "cwd": "${workspaceFolder}",
                "vmArgs": "-Xmx2g -Xms512m"
            }
        ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions