Skip to content

Debugging WISE

Jonathan Lim-Breitbart edited this page Jun 3, 2021 · 3 revisions

Introduction

When running WISE-Docker-Dev, the services (WISE-API, WISE-Client, etc) run inside their own container, so debugging requires special configurations.

Debugging WISE-API with VSCode

Debugging WISE-API is done with Java Debug Wire Protocol (JDWP) at port 5005. When you start WISE-Docker-Dev, the application will be listening to that port for connections. In this section, we describe how to connect to it using Debugger for VSCode.

  1. Open the WISE-API project in VSCode.
  2. Create a .vscode/launch.json if you don't have one already, and add a configuration.
{
    // 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": "Attach to Remote WISE-API",
            "request": "attach",
            "hostName": "localhost",
            "projectName": "wise",
            "port": "5005"
        }
        ...
    ]
}
  1. Press F5 to start the debugger. This should connect to the WISE-API JDWP port.

From here, you can set breakpoints and start using the VSCode debugging tools to inspect and step through code.

Clone this wiki locally