Skip to main content

ZeroBrane IDE

Overview


All you need to create Lua-scripts for Pragma is a basic text-editor, however to get access to advanced debugging capabilities, it's recommended to use the ZeroBrane Studio Lua IDE. ZeroBrane is free and allows you to debug Lua code with features like step-by-step code execution and breakpoints, which you can see in action here:

 

Pragma also ships with an auto-complete script for ZeroBrane to maximize productivity:

Zerobrane_autocomplete.gif

 

You are of course free to use any other editor, in which case you can ignore the rest of this tutorial.

Setup


After downloading and installing ZeroBrane, a few more manual steps are required to set it up for Pragma:

  1. Start ZeroBrane, Select "Project -> Project Directory -> Choose..." from the menu bar, navigate to your Pragma installation (Default: "C:/Program Files (x86)/Steam/steamapps/common/Pragma/") and select it. Without this step, the debugger may not be able to locate the Lua files during debugging.
  2. Navigate to "Pragma/dev/ZeroBrane" and copy its contents to your ZeroBrane installation (Default: "C:/Program Files (x86)/ZeroBraneStudio").
  3. Select "Edit -> Preferences -> System" from the menu bar and append the following lines to the end of the file:
    include "pragma.lua"
    editor.autotabs = true
  4. a
  5. b
  6. c