Skip to content

Contribute to the extension

Josh Tynjala edited this page Apr 5, 2018 · 6 revisions

Build the project

You will need Apache Maven, which will automatically download dependencies and build the extension. To debug the extension, you need Visual Studio Code, obviously.

Open the root folder of the repository in Visual Studio Code. Switch to the Debug view. Make sure that "Launch Extension" is selected in the drop-down. Click the green play button to start debugging in VSCode's Extension Host. VSCode will automatically build the project before launching.

To build from the command line, run the following command in the root folder of the repository:

mvn clean package -s settings-template.xml

Running the extension during development

  1. Open the Debug view in Visual Studio Code.

  2. Select Launch Extension in the drop down.

  3. Press the green play button to start debugging. You may also press the F5 key.

Debugging the Java code

When you run the extension in the Visual Studio Code debugger, you can launch the Java process with the following extra argument (requires modification to extension.ts:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

This allows remote debugging over port 5005.

In IntelliJ IDEA, you can add a new Remote configuration to your module with the following settings:

  • Transport: Socket
  • Debugger Mode: Attach
  • Host: localhost
  • Port: 5005

After launching the extension, start debugging in IntelliJ IDEA. It should attach to the running Java process.

Clone this wiki locally