VS Code Setup: Difference between revisions
Jump to navigation
Jump to search
Created page with "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 exp..." |
m fix formatting |
||
Line 6: | Line 6: | ||
# Install the following files in .vscode: | # Install the following files in .vscode: | ||
launch.json: | ===== 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. | Test by pressing F5 to run KoLmafia. | ||
====== Optional Steps ====== | ====== Optional Steps ====== | ||
* For easier coding, download the [[:File:KoLMafia Style.xml|KoLMafia Style Definitions]] and figure out how to install them in VS Code. | * For easier coding, download the [[:File:KoLMafia Style.xml|KoLMafia Style Definitions]] and figure out how to install them in VS Code. |
Revision as of 01:29, 19 November 2020
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.