![]() |
ZeroBrane studio - 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: ZeroBrane studio (/thread-1392.html) |
RE: ZeroBrane studio - FakeTruth - 02-25-2014 (02-25-2014, 09:02 AM)paulclinger Wrote:(02-24-2014, 10:54 PM)FakeTruth Wrote: I tried to use remote debugging in my own project but it didn't work at all. I have compiled Lua into my project (static linked), could this be the problem and should I use the dll? That's what the documentation said as well. In my case nothing crashed however so I thought something else might be going wrong. Running ZBS and the debugger had no effect at all, it simply didn't do anything for me. (Also I'm using Lua 5.2). RE: ZeroBrane studio - paulclinger - 02-26-2014 (02-25-2014, 04:39 PM)FakeTruth Wrote: That's what the documentation said as well. In my case nothing crashed however so I thought something else might be going wrong. Running ZBS and the debugger had no effect at all, it simply didn't do anything for me. (Also I'm using Lua 5.2). That's interesting. And you added "require('mobdebug').start()" to your script and there was no run-time error (so it found both socket module and mobdebug)? RE: ZeroBrane studio - FakeTruth - 02-27-2014 Ah apparently it could not find mobdebug ![]() Is there any way to set up the environment variables from within Visual Studio (2012)? I tried to set it up like this http://i59.tinypic.com/2my13r4.png but it still cannot find the file. This is what I get as an error Code: Assets/Scripts/MyComponent.lua:2: module 'mobdebug' not found: I changed the Environments setting to Code: ZBS=E:\Programs\ZeroBraneStudio ![]() I tried to compile luasocket into my project but it seems incompatible with Lua 5.2. I made a few edits so it compiles but then it still crashes when require('mobdebug').start() is called. RE: ZeroBrane studio - xoft - 02-28-2014 I have managed to get ZBS debugging working with MCS. There are a few hiccups along the way and it isn't yet too comfortable, but the basics are there ![]() RE: ZeroBrane studio - xoft - 02-28-2014 And we have a crash. Turns out two Lua DLLs don't like fighting each other ![]() RE: ZeroBrane studio - paulclinger - 02-28-2014 (02-27-2014, 04:40 AM)FakeTruth Wrote: I tried to compile luasocket into my project but it seems incompatible with Lua 5.2. I made a few edits so it compiles but then it still crashes when require('mobdebug').start() is called. If you include the socket library, then none of the libraries that are shipped with ZBS should be used. What module does it crash in? If you don't use statically compiled socket, then you need to reference clibs52/ instead of clibs/ folder as clibs/ has modules for Lua 5.1. You probably still need the proxy DLL (this one, but compiled for Lua52: http://lua-users.org/wiki/LuaProxyDllFour). (02-28-2014, 06:27 AM)xoft Wrote: And we have a crash. Turns out two Lua DLLs don't like fighting each other It seems like you got it working based on the discussion here. RE: ZeroBrane studio - xoft - 03-01-2014 Basic integration is finished, ZBS can be used to debug MCS plugins. Plus it provides a nice IDE with a good editor. Now the question that burns me the most: Can the Analyze function be extended (natively or by a plugin) to analyze all the .lua files in a folder, loaded alphabetically one after another? So that we can quickly see if the plugin is using a global value rather than a local, or a typo. RE: ZeroBrane studio - paulclinger - 03-01-2014 (03-01-2014, 01:29 AM)xoft Wrote: Basic integration is finished, ZBS can be used to debug MCS plugins. Plus it provides a nice IDE with a good editor. Yes, it should be possible, but requires couple of tweaks to the analyzer to expose proper API. I can then make a plugin that will expose a menu item that will analyze all files (like Analyze All). Or maybe just integrate it into the IDE itself; something to think about... Thank you for the suggestion! RE: ZeroBrane studio - xoft - 03-01-2014 I think it would be more suited as a plugin, because the load order of the files is important, and a plugin could implement a specific load order. For example MCS loads all files alphabetically sorted, except for Info.lua, which is always loaded last. If there was a way to account for all this, I'd be super-happy ![]() RE: ZeroBrane studio - paulclinger - 03-01-2014 (03-01-2014, 11:53 AM)xoft Wrote: I think it would be more suited as a plugin, because the load order of the files is important, and a plugin could implement a specific load order. For example MCS loads all files alphabetically sorted, except for Info.lua, which is always loaded last. If there was a way to account for all this, I'd be super-happy I got it working to process all the Lua files in a project directory one by one in the alphabetical order. Why would you care about a specific order? All the files are processed independently anyway. It would be the same result as if you opened each of them and run "Analyze", just in a more convenient way to process them all together in one click. |