Skip to content

About

A Defold library that allows you to debug your games using editors supporting the Debug Adapter Protocol.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Defold Moonbug

moonbug logo

A Defold library that allows you to debug your games using editors supporting the Debug Adapter Protocol.

Please report issues at the main repository: atomicptr/moonbug

Editor Integrations

Neovim

Requires you have mfussenegger/nvim-dap installed:

local dap = require "dap"

dap.configurations.lua = {
    {
        type = "moonbug",
        request = "attach",
        name = "moonbug",
        project_root_dir = "${workspaceFolder}",
    },
}

dap.adapters.moonbug = {
    id = "moonbug",
    type = "server",
    port = os.getenv "MOONBUG_PORT" or 8888,
}

Visual Studio Code

We have an official Visual Studio Code extension available here:

  • Visual Studio Code Extension Store (coming soon...)
  • Github

Zed

We have an official Zed extension available here:

  • Zed Extensions Repository (coming soon...)
  • Github

Installation

Open your game.project file and add the following line to your dependencies under the Project section:

https://github.com/atomicptr/defold-moonbug/archive/refs/heads/master.zip

After that, select Project ▸ Fetch Libraries to fetch & update your libraries.

Next in your primary collection (usually main/main.collection), right click the collection and hit Add Game Object File.

Add Game Object File in Defold

And now select the /moonbug/debugger.go file

Select /moonbug/debugger.go

The debugger gets loaded automatically unless you disable the enable_debugger property. You can enable the debugger at runtime via sending a message, see below.

See the properties

Note: The debugger is automatically disabled in release builds unless you explicitly tick the allow_in_release_builds property OR you send a message to the debugger like this:

msg.post("/debugger", "enable_debugger")

License

MIT

About

A Defold library that allows you to debug your games using editors supporting the Debug Adapter Protocol.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages