Skip to content
forked from jushar/MTATD

MTA:SA debugger and unit testing framework

License

Notifications You must be signed in to change notification settings

TheNormalnij/MTATD

 
 

Repository files navigation

MTA:RD: MTA:SA Resources debugger Build Status

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.

Features

  • 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

Screenshots

Debugger Screenshot

Planned Features

  • Variable editing
  • Fix bugs
  • Remote server debug

Usage

  1. Use resources folder as root folder for VS Code workspace.
  2. 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 valid serverpath (the path to the server folder with MTA Server.exe).
  3. Add the debug resource to your project by executing the command MTA:RD: Add debug resource to current project (press F1, enter the command and submit). This only works if you opened the root folder of your server resources folder
  4. Create timeout.longtime file in MTA server folder.
  5. 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.
  6. Start target resource via !start_debug resourceName
  7. You're ready to start debugging now!

Commands

  • !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

About

MTA:SA debugger and unit testing framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 67.8%
  • TypeScript 22.5%
  • Go 9.1%
  • Other 0.6%