Glen MacLachlan
Glen MacLachlan

Reputation: 13

Running ZeroBrane Studio Debugger on Multi User Machine #zerobrane

I'm trying to set up ZeroBraneStudio on a multi-user linux platform there is an issue with running against the debugger server. When one user starts or runs against the debugger server other users are locked out of using the debugger. There is an accompanying error/warning message:

The single instance communication has failed; there may be another instance running, which may cause interference with the debugger.

This occurs whether ZBS is installed globally or in a user's individual $HOME dir and results in all the debugger buttons being grayed out. If I isolate the debugger server PID and kill the process then another user can go ahead and run the debugger but this obviously far from ideal.

There is a way to run multiple instances of the debugger discussed in the Tips and Trick section: https://studio.zerobrane.com/doc-tips-and-tricks

** Run multiple instances of the IDE to debug two applications at the same time** To run multiple instances of the IDE to debug two applications, you can start one instance as you normally do, and then start the second instance using this command: zbstudio -cfg "singleinstance=false; debugger.port = 8173". If you are on OSX, you may need to use open ZeroBraneStudio.app --args -cfg "singleinstance=false; debugger.port = 8173".

but this solution requires users "guess" at an available port number. Is there a better way to implement multiple users running the debugger simultaneously?

Upvotes: 1

Views: 165

Answers (1)

Paul Kulchenko
Paul Kulchenko

Reputation: 26754

I've tried changing debugger.port in user.lua to some other port such as 8173 in the hope that a separate debug server would be started there but that doesn't seem to help.

Configuring a different debugger port is the right way to avoid conflicts when debugging from multiple users. Note that you need to do use this port number in the application you are trying to debug as well, as described in this FAQ answer. You don't need to disable singleinstance check as it's only applied for the instances started from the same user (at least since version of 1.30 when #542 was implemented). I may consider adjusting the default port number in this case, but it still needs to be updated in the application (unless you are using one of the Lua interpreters).

If that still doesn't work you need to provide more details on what's not working and include the messages from the Output window shown in the IDE.

[Update] Based on your edit, it seems you already found the solution in the documentation. I'll consider picking a new number during a conflict to avoid "guessing" by the user, but for now this solution is still available.

Upvotes: 0

Related Questions