This extension implements a debug adapter for MTA:SA's (Multi Theft Auto: San Andreas) Lua. Note that it doesn't work with plain Lua though.
- Breakpoints
- Step into, Step over, Step out
- Variable lists (locals, upvalues, globals)
- Resource restarts
- Integrated runcode via VSCode's "Debug Console" feature
- Stack traces
- Debug messages in "Debug Console"
- Commands
- Automatic breakpoint in error line
- Variable editing
- Fix bugs
- Remote server debug
- Use
resources
folder as root folder for VS Code workspace. - When you start debugging, Visual Studio Code asks you to create a new launch configuration based upon a default configuration.
Make then sure you insert a validserverpath
(the path to the server folder withMTA Server.exe
). - Add the debug resource to your project by executing the command
MTA:RD: Add debug resource to current project
(pressF1
, enter the command and submit). This only works if you opened the root folder of your server resources folder - Create
timeout.longtime
file in MTA server folder. - Launch the debug test server by pressing F1 in Visual Studio Code and entering
MTA:RD: Start MTA Debug Server
(the auto-completion will help you). You could also create a key mapping for this command. - Start target resource via
!start_debug resourceName
- You're ready to start debugging now!
!start resourceName
- Start resource!stop resourceName
- Stop resource!restart resourceName
- Restart resource!refresh resourceName
- Refresh resource!refreshall
- Refresh all resources!start_debug resourceName
- Start resource in debug mode