Total War: WARHAMMER III

Total War: WARHAMMER III

Not enough ratings
VSCode LUA Debugger (ALPHA)
   
Award
Favorite
Favorited
Unfavorite
graphical
Tags: mod
File Size
Posted
Updated
0.053 MB
Sep 18 @ 11:09am
Oct 16 @ 4:44am
6 Change Notes ( view )

Subscribe to download
VSCode LUA Debugger (ALPHA)

Description
A Visual Debugger and inspector for LUA

VSCode Extension:
https://marketplace.visualstudio.com/items?itemName=Fietspompje.tw-lua-debug

Instructions are on marketplace

Current Features:
- Breakpoints
- Stepping over, in and out
- Inspect local and global variables
- Print to vscode from lua. debuggee:print("warning", "some warning") (categories are "warning", "error", "log")
- Pausing (see limitations and quirks)
- Break on Error
- Execute lua instructions from vscode
- Virtual source files - when starting the debugger a virtual folder will be added to your vscode project containing lua files formthe active mods in the used_mods.txt file.
- script_error function now prints to vscode debug console

Limitations and Quirks
- Pausing does not work during load screens and loading
- Disconnecting and reconnecting the debugger from vscode is not advised
- Pressing pause in vscode will not stop warhammer3 where it is executing in lua, but inside the real_callback function

Future:
- Rome 2, Three Kingdoms support
- Mod Hot Reloading
- Full Dev environment
- Example video

Changes:
- Debugger can now connect to the game at any time (except during loading)
- Stability fixes
- Reduced the mod to 3 files
- Virtual source files

< >
3 Comments
Mr.Soul Sep 19 @ 1:38pm 
Very cool, thank you sharing this, this’ll be a nice sanity check when I’m knee deep in lua and unsure what does what anymore haha
Fietspompje  [author] Sep 19 @ 1:27pm 
@Mr.Soul
Similar yes. It inserts itself into the game's lua code via debug hooks, allowing you to debug live lua code while the game is executing it. Allowing you to step through code line by line. Similar to how a C# or C++ debugger can.
Mr.Soul Sep 19 @ 11:24am 
wait, so is like rextester but essentially tied right into the game's paths?