KubeJS Debug Adapter
by warmthdawn
KubeJS Debug Adapter lets a developer step through KubeJS scripts with breakpoints in Visual Studio Code while the game is running.
What it does
The mod connects a running Minecraft client to the Visual Studio Code debugger, so KubeJS scripts can be paused and inspected line by line. A developer starts the game until it waits for a debugger, then attaches the editor and sets breakpoints in the script files. When a breakpoint is hit, execution stops and the editor shows the state of the script.
The mod is client-side only, so only the client that runs the scripts needs it, and a server does not. It is published for Forge and is available for 1.18.2 only. Installation requires KubeJS and Rhino, and the mod is released under the MIT License, so the code is open source and its source code and issue tracker are public.
Key features
Breakpoints in KubeJS scripts
Breakpoints can be set in KubeJS script files in Visual Studio Code, and execution stops when one is reached.
Debugger attach over a port
The game waits on a listening port, and the editor connects to it by entering that port when prompted.
Debugger extension for the editor
A Visual Studio Code extension named Debugger KubeJS provides the debugging session, started with F5 and the KubeJS Scripts option.
Start before the script loads
The game pauses at its loading dialog until the debugger attaches, so scripts can be stepped from the first line they run.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Use cases
Script development
A pack author can inspect variables and control flow in a KubeJS script while testing an event handler.
Locating script errors
A breakpoint placed before a failing line shows the values that led to the error without adding print statements.
Who it’s for: Script authors and pack developers who write KubeJS scripts and use Visual Studio Code. Players who only run finished packs have no need for it.
How it compares
Ktice is a client and server mod for Fabric and Forge under the MIT License, with files for 1.18.2, so it is not a debugger. Vintage KubeJS is a Forge mod for client and server under the MIT License, covering 1.18.2 – 1.20.1. KubeJS Debug Adapter differs by running on the client alone and working only with the Visual Studio Code debugger on 1.18.2.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| KubeJS Debug Adapter | Forge | 1.18.2 | Client-side only | 2022-07-29 |
| Ktice | Fabric and Forge | 1.18.2 | Client and server | 2022-12-20 |
| Vintage KubeJS | Forge | 1.18.2 – 1.20.1 | Client and server | 2024-08-08 |
Questions
Does KubeJS Debug Adapter need to be installed on the server?
Which dependencies does KubeJS Debug Adapter require?
Can KubeJS Debug Adapter be used with other editors?
In the catalog
KubeJS Debug Adapter is one of 36,990 Utility mods on ModsFinder, and one of 14,575 Utility mods for Forge. 9,044 mods support Minecraft 1.18.2.
More from warmthdawn
Similar mods
Official listing
- Modrinth page
- modrinth.com/mod/kubejs-debug-adapter
- Owner
- warmthdawn
- Published
- 2022-07-29
- Updated on Modrinth
- 2022-07-29
- Facts verified
- 2026-10-15