Skip to content

feat: debugger #2

Open
Open
@JeanJPNM

Description

@JeanJPNM

Just like there is the language server protocol to have cross editor support for language features, there also is the debug adapter protocol, which allows any editor to communicate with any protocol-compliant debugger.

The main idea is to create a java mindustry mod with functionality similar to already existent logic debuggers such as deltanedas/ldb that communicates with another process through a websocket connection.

graph TD
  pkg["Package"]
  mod["Mindustry Mod"]
  editor["Editor"]
  editor -->|debug adapter protocol| pkg -->|json messages| mod
Loading

I may cut the middleman if putting the DAP functionality directly on the mod takes less effort and doesn't force me to reimplement features already present on the language server.

I still need to investigate what would be the limitations of this approach, a few that come to mind are:

  • May need to pause the game when a processor hits a breakpoint
  • Limited or no support to conditional breakpoints
  • Debugging is likely to change the behavior of scripts that frequently interact with the world

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions