pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 516 forks source link

Request: Support for debugging multiple Lua-states in the same program at once #769

Open Silverlan opened 7 years ago

Silverlan commented 7 years ago

My multiplayer game engine has two Lua-states, one handles serverside logic, the other everything clientside. If a listen server or single-player game is started, both states are running in parallel. It would help immensely if it was possible to debug both states at the same time, without having to close and re-establish the connection every time to switch between them. Right now ZeroBrane will just refuse any additional session requests: "Refused a request to start a new debugging session as there is one in progress already."

pkulchenko commented 7 years ago

@Silverlan, that's correct, only one debugging session is supported, but I do have a commercial extension that supports multiple debugging sessions and provides a way to switch between them, shows their current status (suspended/running), allows to set their names shown in the IDE and so on. I'll add a documentation page with details. You can contact me by email for pricing and licensing information.

madmaxoft commented 7 years ago

It might also be possible, although not super-comfortable, to run two instances of ZBS, each listening on a different debugging port, and each of the Lua states connecting to the specific port.

pkulchenko commented 7 years ago

@madmaxoft, this is a good point. @Silverlan, here is the FAQ item on how it can be done: https://studio.zerobrane.com/doc-faq#how-do-i-start-two-zerobrane-studio-instances-to-debug-two-applications-at-the-same-time, but you will need to configure different states to use different port numbers.

Silverlan commented 7 years ago

Sadly the commercial extension isn't an option for me, since I don't actually need this for myself, I need it for other people working on the engine. I'll give the multi-instance option a try, thanks for the tip!