Skip to content

--debugger fails on macOS #2532

@Benthomann

Description

@Benthomann

I’m experiencing an issue when trying to use Premake5 on my Mac with the debugger:

premake5 gmake2 --debugger

I get the following output:

Loading luasocket...
Starting debugger...
Error: [string "src/base/_foundation.lua"]:68: module 'socket' not found:

I found a similar issue (#1158). I tried, but to no avail.

Here is what I tried:

  • Installed Lua 5.3 from source.
  • Installed Luarocks from source.
  • Installed luasocket for this Lua 5.3 installation.
  • Started the Debugger Server in ZeroBrane Studio.

However, I still don’t understand how this helps with debugging Lua code in Premake5, and the error persists.

It seems the problem may be related to the paths Premake searches for Lua modules. On macOS, many packages installed via Homebrew are located in /opt/homebrew/, but Premake may be looking in /usr/local/, so it cannot find luasocket.

Could this be causing the issue? Any guidance on how to properly configure Premake5 to work with Homebrew-installed Lua and Lua modules on macOS would be appreciated.

Suggested enhancement:

It might be useful to add an option like --trace that outputs what Premake is doing line by line in the premake5.lua script.

My version of Premake is 5.0.0-beta6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions