Corona IDE

> ZB Studio is great IDE. I am using it for two months and it saved me hours of debugging. You can stop at any time, check the status of your app, see what is wrong, change it… It is light, fast and stable.

Hi Srdjan, Thank you for the feedback! ZBS indeed strives to be a simple minimalistic IDE, but some of the “fancy” features are being worked on; please keep the comments coming…

Paul. [import]uid: 195109 topic_id: 34354 reply_id: 142655[/import]

Wow, GREAT product!  Currently evaluating for a small team on MACs and PCs.  Liking what we see.

One thing, couldn’t seem to see highlighted text in Monokai theme.  Checked it out and:

Background  = H’272822’,

CurrentLine = H’49483E’,
Selection   = H’49483E’,

Is this an error in the theme?  I changed it to:

CurrentLine = H’2D2F29’,

Much better, especially in fullscreen mode.

@gamedeveloper, thank you for the feedback. I added and pushed the change to the color scheme as you suggested. Also, the latest version of ZBS (0.361) enables full Corona debugging on OSX, which was not available in earlier versions (some functions like remote console and watch/expressions were disabled). Paul.

with 0.361 if I’m holding down the CMD key, and I accidentally drag my finger on my magic mouse the font scales up or down.  It’s very hard to get the font size back and CMD-0 doens’t change the size back to the default.  I would think supporting CMD-0. CMD-+ and CMD-- should work.

@Rob Miracle, you can use this (https://github.com/pkulchenko/ZeroBraneStudio/issues/113#issuecomment-15999051) to add CMD-0, CMD-+ and CMD-- to zoom as you’d like (the shortcuts list Ctrl, but it will be mapped to CMD on OSX). I’m thinking about adding this to the menu permanently…

Our project is structured with subfolders.

When I select the project folder only files within are shown, no subfolders are visible.

Is that not supported ?

@ubj3d.android: no, subfolders should be displayed in the same Project panel. What OS are you on? Can you try to open a different folder? If nothing works, can you send me a screenshot to the email in my github profile: https://github.com/pkulchenko? Thank you. Paul.

@Paul,

Is it possible to shrink the height of the output window below 10 lines of text tall?  

It appears to hold about 10 lines of text at it’s minimum size.  I like to keep it open all the time, but just shrink it down to 4 lines for screen real-estate reasons (working on a Macbook Air).

0.361 Mac.

> Is it possible to shrink the height of the output window below 10 lines of text tall?

@gamedeveloper, I don’t see a way for now to make it smaller; you can move the output panel to be positioned right under the Project panel, which will give you the entire height of the screen for editing. Also, you can hide it as it will be re-opened if there is new information in it (this is controlled by ‘activateoutput’ setting in config, which is “true” by default).

I’m checking on how to make the minimum size smaller…

Paul, another question/observation.

I’m now testing on PC Win7 and have noted the following:

  1. no ouput in output window unless I use “require(‘mobdebug’).start()”  however this only provides output in RUN mode.  DEBUG mode generates the following error " C:\Users\Mark\Desktop\1 was not found"

  2. output is always duplicated (prints 2x) and string output always displays quote characters.  e.g., print(“word”) displays as “word” rather than word

…any thoughts?  (Missing path variable of some kind?) 

0.361 PC.

@megacube, #1 doesn’t look right. Can you include the line in the Output panel that starts with “Program starting as” (with and without debugging)? This might have happened with 0.36, but should not with 0.361. I see you specified the version, but are you sure that this is what you are running in this case?

re #2. The debugger captures the output you generate with “print” and sends it back to the IDE, which is useful in those cases when you don’t have access to the output of the simulator (for example, when  you run it remotely on another machine). In those cases where it’s running locally *and* is redirected to the IDE already, you get duplicate output. You can disable it if you open interpreters/corona.lua, find line with “redirect =” and replace “c” (copy) with “r” (redirect) or “d” (default, no redirect).

The reason why it’s in quotes is that this redirect implements pretty printing. You can do “print({1,2,3,“a”,“b”,“c”})” and it will be printed as a table, which gives you a quick way to see what’s going on while debugging. Strings are printed as “string”; this is the same functionality you see in Local/Remote Console that also does pretty printing for you.

@megacube,

> 1. no ouput in output window unless I use “require(‘mobdebug’).start()”  however this only provides output in RUN mode.  DEBUG mode generates the following error " C:\Users\Mark\Desktop\1 was not found"

One other thing; this redirect I mentioned only works with the debugger, so when you use Run, you won’t get any redirect or pretty-printing. In fact, I’m surprised you have this double output as I’m also running on Windows (Vista) and don’t see the “normal” output from the simulator (when running or debugging), only the pretty-printed output from the debugger.

Maybe you are using some newer Corona release than I do as I remember discussing having redirected output available with them. Mine is fairly old 2012.840.

Paul,

Here is the program and output without debugger using RUN mode:

function mark()
    print(“Test String…”)
end

mark()

print(“Test String…”)


Program starting as ‘“C:/Program Files (x86)/Corona Labs/Corona SDK/Corona Simulator.exe” “C:\Users\Mark\Desktop\main.lua”’.
Program ‘Corona Simulator.exe’ started in ‘C:\Users\Mark\Desktop’ (pid: 1048).

…and here is the output using the debugger line in RUN mode:

require(‘mobdebug’).start()

function mark()
    print(“Test String…”)
end

mark()

print(“Test String…”)


Program starting as ‘“C:/Program Files (x86)/Corona Labs/Corona SDK/Corona Simulator.exe” “C:\Users\Mark\Desktop\main.lua”’.
Program ‘Corona Simulator.exe’ started in ‘C:\Users\Mark\Desktop’ (pid: 5220).
Debugging session started in ‘C:\Users\Mark\Desktop’.
“Test String…”
“Test String…”
Debugging session completed (traced 0 instructions).
Debugging session started in ‘C:\Users\Mark\Desktop’.
“Test String…”
“Test String…”

…and here is the output using DEBUG mode with the same sample code above:

Program starting as ‘“C:/Program Files (x86)/Corona Labs/Corona SDK/Corona Simulator.exe” -debug 1 -project “C:\Users\Mark\Desktop\main.lua”’.
Program ‘Corona Simulator.exe’ started in ‘C:\Users\Mark\Desktop’ (pid: 6152).

…and the following error message from the Corona Simulator:

c:\Users\Mark\Desktop\1 was not found.

Simulator version 2013.1076(2013.4.3)

@gamedeveloper,

> Is it possible to shrink the height of the output window below 10 lines of text tall?  

I did find a way to allow the windows to be smaller. I already checked in the change; you can either update the code from github or to wait for the next packaged release. You can also apply the change yourself.

After it is applied, you will need to select “View | Default Layout” to take updated settings into account, as your current layout stores settings for Min/Best sizes.

Paul.

@megacube, thank you for the details.

> Here is the program and output without debugger using RUN mode:

That’s correct; you’d see no output in the RUN mode.

> …and here is the output using the debugger line in RUN mode:

Debugging session started in ‘C:\Users\Mark\Desktop’.
“Test String…”
“Test String…”
Debugging session completed (traced 0 instructions).
Debugging session started in ‘C:\Users\Mark\Desktop’.
“Test String…”
“Test String…”

This is correct too. What happens here is that you have two "print"s in your script that each print the same string “Test String…”. The reason why this thing is executed twice is more subtle. This is something I described under “Debugger Functions” here and am copying here for convenience: “The Corona SDK engine seems to include a check that automatically restarts your application when it detects that the application is “stalled”. This is exactly what happens when the application is being debugged as it passes the control back to the IDE (even though for a short time), so it may look like the application is started twice (if you put a breakpoint in your main script). To avoid this effect, you can start debugging inside enterFrame event handler, which I’m going to demonstrate in the next section.”

The description here is inferred based on the behavior I see and discussions in forums on this issue. This seems to be mostly harmless as it only executes the “main” body twice when debugging; you can avoid this by moving debugging code to one of the handlers, for example, onUpdate:

function onUpdate(event)
  – let the first call to onUpdate to return quickly;
  – start the debugging during the second call to trick Corona SDK
  – and avoid restarting the app.
  if done == nil then done = false return end
  if not done then
    require(“mobdebug”).start()
    done = true
  end

If someone knows a better way to avoid this, I’m listening…

> …and here is the output using DEBUG mode with the same sample code above:

> Program starting as ‘“C:/Program Files (x86)/Corona Labs/Corona SDK/Corona Simulator.exe” -debug 1 -project “C:\Users\Mark\Desktop\main.lua”’.
> Program ‘Corona Simulator.exe’ started in ‘C:\Users\Mark\Desktop’ (pid: 6152).

> …and the following error message from the Corona Simulator:

> c:\Users\Mark\Desktop\1 was not found.

This is very strange as this code should not be executed if you are using 0.361. This is a parameter for the OSX version, not Windows. Can you check if your interpreters/corona.lua has the right content, esp. this line? Thank you.

Paul.

Paul,

Copying that block of script fixed my problems.  I’ve also got the output window at 5 lines height.  You sir, are a scholar and a gentleman.

Oh, I’m megacube and gamedeveloper.  :slight_smile:

I was posting from my PC and didn’t realize that I was autologged in to the forums on the alternate email/user.

I’ve got a second FREE account using the new build (I’m testing that on my pc).  Sorry for any confusion.

Wow, GREAT product!  Currently evaluating for a small team on MACs and PCs.  Liking what we see.

One thing, couldn’t seem to see highlighted text in Monokai theme.  Checked it out and:

Background  = H’272822’,

CurrentLine = H’49483E’,
Selection   = H’49483E’,

Is this an error in the theme?  I changed it to:

CurrentLine = H’2D2F29’,

Much better, especially in fullscreen mode.

@gamedeveloper, thank you for the feedback. I added and pushed the change to the color scheme as you suggested. Also, the latest version of ZBS (0.361) enables full Corona debugging on OSX, which was not available in earlier versions (some functions like remote console and watch/expressions were disabled). Paul.

I’m getting black text on dark background in Watch window.  This is using the Monokai theme.

The background turns white if I select the variable and choose “edit watch.”

See attached.

OSX (0.361; MobDebug 0.525)

@gamedeveloper; shouldn’t be happening. Thanks for letting me know; I’ll take a look… Paul.