Debugging plugin in ZeroBraneStudio on Mac - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Debugging plugin in ZeroBraneStudio on Mac (/thread-3002.html) |
Debugging plugin in ZeroBraneStudio on Mac - coding.solo - 08-24-2017 I'm having trouble connecting to the server when I launch a debugging session. I have the SDK selected (Cuberite - release mode) and my project directory is the directory of the plugin. I launch the session via F5 and it creates a server that I can see if I examine my processes. I can't connect to it via my client nor does it have a web interface going. Can someone identify what I'm doing wrong? Program starting as '/Users/codingsolo/Downloads/Server/Cuberite --no-output-buffering'. Program 'Cuberite' started in '/Users/codingsolo/Downloads/Server/' (pid: 42242). Debugging session started in '/Users/codingsolo/Downloads/Server/'. RE: Debugging plugin in ZeroBraneStudio on Mac - coding.solo - 08-25-2017 It seems like it may be breaking immediately in !EnableMobDebug.lua on line 18: end. It has a green arrow pointing there. RE: Debugging plugin in ZeroBraneStudio on Mac - NiLSPACE - 08-25-2017 !EnableMobDebug.lua is a file which is inserted by ZeroBraneStudio in order to make live debugging possible. Perhaps you can create an issue there. There aren't many people who use a Mac in our team, so it's hard to reproduce I'm afraid. RE: Debugging plugin in ZeroBraneStudio on Mac - xoft - 08-25-2017 No, don't. !EnableMobDebug.lua is a file that the Cuberite plugin creates, ZBS has nothing to do with that file. RE: Debugging plugin in ZeroBraneStudio on Mac - xoft - 08-25-2017 I don't quite understand what you're doing, how you're trying to get it to work. There's too much generic "server"-s in your description. Normally, you should just open ZBS, open the plugin folder as the project folder, set the interpreter to Cuberite (release or debug). Then just select Project -> Run from the menu. The Cuberite interpreter will find the Cuberite executable, run it for you and attach the ZBS debugger. There's two basic things that could go wrong: if the Cuberite interpreter plugin for ZBS cannot find the Cuberite executable (it will say so in the Output pane), or if your plugin is not enabled in Cuberite's configuration (either enable it in Cuberite's settings.ini, or after Cuberite starts, do a "load PluginName" console command). RE: Debugging plugin in ZeroBraneStudio on Mac - xoft - 08-25-2017 After re-reading your post, I'm hopefully starting to understand what you're reporting. Correct me if I'm wrong. You start debugging in ZBS (F5, or menu Project -> Run) Cuberite is started for you by the ZBS Cuberite plugin You cannot connect to Cuberite using the Minecraft client, nor access the webadmin pages using your browser. Does Cuberite say "Startup complete, took XYZ ms"? If not, does it report anything in the console? It may take some time for it to start when it is started for the first time (generating worlds etc.) If you start Cuberite normally (without ZBS), does it start up and can you connect? Is there a Cuberite server instance already running when you start debugging? (two Cuberite instances from the same folder cannot run at the same time) If you do a "netstat -nlat", are the debugger's Cuberite ports listed in the output? RE: Debugging plugin in ZeroBraneStudio on Mac - coding.solo - 08-26-2017 (08-25-2017, 11:10 PM)xoft Wrote: After re-reading your post, I'm hopefully starting to understand what you're reporting. Correct me if I'm wrong.-- Thanks for you questions. - I did not get a Startup complete and the program would terminate after I resumed debugging from the !EnableMobDebug.lua file. - The console would not report anything. This was being performed on an already initialized Cuberite server and a first-run initialization. - Cuberite would start normally without ZBS and I could connect. - There was not an additional Cuberite server running ( looked via "ps" and "lsof" ) -- HOWEVER! I have found out that if I edit the cuberite.lua ZBS package and redirect the debuggee output to the ZBS Output pane it works. local pid = CommandLineRun( Cmd, -- Command to run ExePath:GetFullPath(), -- Working directory for the debuggee true, -- <--- WORKS ON MAC! Redirect debuggee output to Output pane? (NOTE: This force-hides the Cuberite window, not desirable!) true, -- Add a no-hide flag to WX nil, -- StringCallback, whatever that is nil, -- UID to identify this running program; nil to auto-assign OnFinished -- Callback to call once the debuggee terminates ) RE: Debugging plugin in ZeroBraneStudio on Mac - xoft - 08-26-2017 Oh well, at least you found a workaround. I'm afraid I can't do much about it, since I don't have a Mac available to dig deeper into what's going on. Thanks for the report. |