VS Code Setup

From Kolmafia
Revision as of 01:29, 19 November 2020 by Ikzann (talk | contribs) (fix formatting)
Jump to navigation Jump to search

This guide assumes that you have a recent enough version of the Java JDK, ANT, and VS Code. Completing Compiling from Source is a requirement for this guide, although experienced developers can skip to whatever step is appropriate.

Build and Config Project Setup

  1. Open the KoLmafia directory in VS Code.
  2. Install the Java Extension Pack, Language Support for Java, Project Manager for Java, and Debugger for Java VS Code extensions.
  3. Install the following files in .vscode:
launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Debug (Launch)-KoLmafia<kolmafia>",
            "request": "launch",
            "mainClass": "net.sourceforge.kolmafia.KoLmafia",
            "projectName": "kolmafia",
            "args": "--CLI"
        }
    ]
}
settings.json:
{
    "files.exclude": {
        "**/.classpath": true,
        "**/.factorypath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/*.class": true
    },
    "java.project.referencedLibraries": [
        "lib/**/*.jar",
        "src/**/*.jar"
    ]
}

Test by pressing F5 to run KoLmafia.

Optional Steps