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.
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
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.
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: