VS Code Setup
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
- Open the KoLmafia directory in VS Code.
- Install the Java Extension Pack, Language Support for Java, Project Manager for Java, and Debugger for Java VS Code extensions.
- 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
- For easier coding, download the KoLMafia Style Definitions and figure out how to install them in VS Code.