Script API Web Debugger is a web version of Minecraft Bedrock Script API debugger that is interactable and is able to inspect further.
-
BDS Console
- Prettier output
-
Process info
- PID
- Status
- Exit code
-
Script Eval
- Debugger variables & helpers, accessible through
this - Minecraft modules (
mc,gt,mcui)
- Debugger variables & helpers, accessible through
-
Script Console Output
- Logs script console, including stack trace
-
Event Inspector
- Logs subscribe & unsubscribe listeners, including stack trace
- Disable / enable listener
- Event logs, including event data, timing, listeners, and error logs
-
Run Inspector
- Logs runs methods (
run,runTimeout,runInterval, andclearRun), including stack trace - Suspend / resume / clear runs
- Logs Timing & errors of runs
- Logs runs methods (
-
Property inspector
- Inspect world & entities property registries
- Watch / unwatch entity dynamic properties
-
Stats
- World tick timing (runs, events, worldtime)
- Script used & size stats (from
script watchdog exportstats)
-
Form
- Log form show calls, including stack trace
- Form preview
- Override form response
-
Method Call Logs
- Watch / unwatch native method call
- Logs stack trace when a native method is called
-
Windows (untested on Linux)
-
BDS for Windows (v1.20.12.01 or similar)
-
Node.js (check with
node -v) -
Typescript (globally installed via npm, check with
tsc -v) -
Browser (preferably Firefox because the GUI is potentially buggy with Chrome)
-
Download / clone with git (
git clone https://github.com/frostice482/script-api-web-debugger) -
Run
setup.bat. This will install all node dependencies and transpiles script on client, pack, and server folder.Alternatively, run
tsc -p client/tsconfig.jsonandtsc -p pack/tsconfig.json. -
Add a pack to be debugged with
pack.bat subadd path\to\pack_folder. Replacepath\to\pack_folderwith the directory that points to the folder of the pack which containsmanifest.json.This step can be skipped if there's no pack to be debugged.
-
Add the pack to the BDS with
pack.bat hook path\to\bds_folder. Replacepath\to\bds_folderwith the directory that points to the folder of the BDS which containsbedrock_server.exe.If the BDS is fresh new, make sure to run it once before adding. This is required because the script will need to access and modify the world's
world_behavior_packs.jsonand copy the pack intodevelopment_behavior_packsfolder. -
Start the server with
server.bat start path\to\bds_executable. Replacepath\to\bds_executablewith the directory that points to the executable of the BDS (bedrock_server.exe). -
Open the browser by pressing
Ctrl+Oin the node process or by openinglocalhost:7070.
-
It is recommended to disable script watchdog, as the debugger adds little to alot amount of overheads depending on the pack's intensity and may cause unwanted crash.
It can be disabled by adding
script-watchdog-enable=falsein theserver.properties. -
Using this may cause high CPU usage on all processes (Bedrock, Node, and the browser).
-
watch- runstsc watch -
compile- converts TS source code to JS compiled code -
copy <path\to\folder>- copy pack to the folder -
subadd <path\to\pack_folder>- adds a script pack to be debugged -
subrm- removes an added script pack -
hook <path\to\bds_folder>- adds and lists the pack to the bds world- Adds the pack to
[BDS]/development_behavior_packs/[UID]. The pack UID is9db69c9c-d264-4a43-995b-77971d5c41e2unless changes. - Lists the pack to
[BDS]/worlds/[levelname]/world_behavior_packs.json.
- Adds the pack to
-
unhook <path\to\bds_folder>- removes and unlists the pack from the bds world
watch- runstsc watchcompile- converts TS source code to JS compiled code
watch- runstsc watchcompile- converts TS source code to JS compiled codestart <path\to\bds_executable> <port?>- Starts the server. Port is defaulted to7070.