-
-
Notifications
You must be signed in to change notification settings - Fork 646
Debugging Scripts
You can debug your Premake project and module scripts using the free Decoda IDE.
Configure your project debugging settings:
-
Command is the path to your Premake executable. This needs to be a debug build of Premake, as Decoda needs access to the executable's symbol table.
-
Command Arguments are the arguments to pass to Premake. You will need to specify the location of Premake's own scripts via
--scripts=path/to/premake5. If you project script is not namedpremake5.luaor is not located in the working directory (below), you should also specify--file=path/to/premake5.lua. -
Working Directory is the directory that should be made current before Premake is launched.
-
Symbols Directory is the path to Premake's PDB file, which is usually located in the
bin/debugdirectory within Premake's source tree (the same directory which contains the debug executable).
Now open the _premake_main.lua script, and set a breakpoint in the _premake_main() function.
Hit F5, and you're good to go. You can add files in the "project explorer", but they will eventually be added automatically as the script executes.
Install babelua extension from here https://babelua.codeplex.com/
Go to the lua menu ..create a new project just like in decoda ... This project will appear in your solution. Set it as the default one and run it
Of course this will not work with embedded scripts. So you will need to pass the /scripts paramaters
Note that after using the plugin i noticed some issues
- visual studio tends to stall a lot when loading a project
- i had some issues with another extension that i had installed ... a custom highlighter
It may also be possible to debug Premake scripts with SLED or Eclipse LDT. If you give either of these a try, let us know what you find out!.