A new version of the IDE has been released and is available at
http://studio.zerobrane.com/. For those starting with it, I posted a "getting started" guide (
http://studio.zerobrane.com/doc-getting-started.html), an FAQ (
http://studio.zerobrane.com/doc-faq.html), and other documentation (
http://studio.zerobrane.com/documentation.html). I also added a very simple live coding example using Gideros (
http://notebook.kulchenko.com/zerobrane/gideros-live-coding-a-simple-example).
It is now possible to pause the debugger when running as scratchpad, inspect values and execute commands in the remote console, and then continue your live coding session.
Among other changes, the last version added live coding support for Moai as well as debugging and auto-complete integration for Corona. Enjoy and let me know if you run into any issues. Thank you for all the feedback and improvement ideas. Paul.
Comments
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Is it possible in ZeroBrane to use the print function to output info anywhere where i can read it? (the 'output' window seems to be more logical, but it does not work for me)
thanks
Fragmenter - animated loop machine and IKONOMIKON - the memory game
What you say "it doesn't work", do you mean it doesn't appear there? Can you check interpreters/gideros.lua file to make sure it has 'redirect = "c"' option set for the debugger? If not, you may want to grab the latest version of that file. If the fragment is there, please provide more details (the platform, ZBS version) or a code fragment I can test with. Thanks.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Ultimate Games on Appstore
Ultimate Games on Google Play
if rundebug then DebuggerAttachDefault({redirect = "c"}) end
so that seems fine. otherwise the test file is project with a sole main.lua file containing:
print("test")
and the output windows has this only(I changed the paths to **):
Program starting as '"C:\Program Files (x86)\Gideros\GiderosPlayer.exe"'.
Program 'GiderosPlayer.exe' started in '**\printtest' (pid: 1136).
Starting the player and waiting for the bridge to connect at 'C:\Program Files (x86)\Gideros\Tools\gdrbridge.exe'.
Starting project file '**\printtest.gproj'.
Program completed in 2.52 seconds (pid: 1136).
it is on win7 and the latest 0.34 zb version, before i deleted the whole zb directory with the previous install so it is a clean install in this sense (although registry values were not cleared, as it immediately knew which was the latest project i was working on etc).
Fragmenter - animated loop machine and IKONOMIKON - the memory game
It seems like you "run" your project instead of debugging it. Print redirect only works when you run it under the debugger.
Try with:
> registry values were not cleared, as it immediately knew which was the latest project i was working on etc
These are saved in a configuration file outside of the ZBS directory; that's why the new install picked up the current configuration (http://studio.zerobrane.com/doc-faq.html#how_do_i_restore_default_configuration_for_recent_files_projects_and_editor_tabs).
thanks, i tried both run and start debugging, but it seems that the important thing i did not do before is adding the line:
require("mobdebug").start()
after adding this everything works fine. probably it is somewhere in some help written that this line is needed, sorry for not paying attention. on the other hand maybe when one starts debugging then this line should be considered to be there by the compiler even if it is not there? it is a bit strange that you need to add this line, especially when i switch from the gideros ide back and forth, which does not work when this line is there.
although this way you can put this line anywhere in your code, which maybe useful for something i don't know about.
in any case, thanks again. i was suffering with the gideros ide freezing on me (because of avg probably), so using zerobrane became the only option - and now i start to enjoy its added value.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
@keszegh, agree, but my preference is to keep things like this explicit for several reasons. I know that some other IDEs modify your source file behind the scenes and I considered doing so, but using this way it works with any method launching the script: you can launch it from ZBS, from Gideros Player or from the device (may need to add IP address if it's from a different computer). If there was a way to pass the information to the player without modifying the source code, I'd probably use it.
otherwise thanks for the nice ide.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
@keszegh, I just pushed several changes that may resolve this issue for you(https://github.com/pkulchenko/ZeroBraneStudio). First, the debugging for gideros scripts should start immediately, which was something that other people asked about too (one can still turn it off with debugger.runonstart = false), and second, it won't stop in main.lua anymore, but will only stop on breakpoints (or when you use "break" in the application). You don't even need to have main.lua open.
It should work with other features (like live coding). Please let me know if this works for you and it can make it into the release I plan for tomorrow. Thanks. Paul.
just in case, where should be the line "debugger.runonstart = false" in case i want to turn off debugging? i found that it should be in cfg\user.lua like any other user config setting, right? this may be useful for some people.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
whenever i reach a breakpoint i always see inside only such an error:
Error: [string "do local_={{{"init","mycounter.lua",3,4"L..."]:1: attempt to index field '?' (a nil value)
edit: it works in some lua files for me but in some others i get the above error
Fragmenter - animated loop machine and IKONOMIKON - the memory game
> where should be the line "debugger.runonstart = false" in case i want to turn off debugging? i found that it should be in cfg\user.lua like any other user config setting, right?
That's correct.
> it works in some lua files for me but in some others i get the above error
> whenever i reach a breakpoint i always see inside only such an error:
Can you send me the fragment you are debugging to allow me to reproduce it locally (email to paul at kulchenko dot com)? There is possibly a bug in the serializer that serializes the stack trace, although I haven't seen any issues like this in my Gideros debugging (or in other cases).