Automatically clear simulator output

Hi there,

is there any way to automatically clear the simulator output on each run of a project?

Right now I have to log a lot of text during a run and it’s really inconvenient there’s no fast way to find the beginning of the last run if there are potentially hundreds of pages dumped every few seconds. I absolutely love the very fast turnaround times you get with the automatic reload/restart of an app whenever a file is modified :slight_smile:

Of course I don’t want this to be the general/only way the output is handled as there are many situations where you prefer to have the history of many runs - but an option or even a Lua command would be great.

Hi,

I suppose this depends on the editor you are using but with Sublime, pressing Win+F10 will run the projects with a clean output.

At the same time, Just saving the script (CTRL+S) will save the script and restart the simulator, without clearing the output.

Good luck!

Anaqim

Ideally, I think, it should be so that we don’t have to restart the simulator and still be able to clear the console for a new run.

I usually don’t close the simulator but just let it reload and restart the app when any file changes - fastest turnaround times and it’s the most flexible too - also the workflow is smoother when you’re using many other filetypes besides Lua sources and these might come frome other editors/tools than Sublime.

The current situation f.i. was that I wrote some custom transition function and I had to debug/tweak it’s code/values so I did some 5-10 runs, watched the simulator and then wanted to examine the console output of the last run (and then repeat the whole thing multiple times).

Of course it’s already blazingly fast using Corona so a whole iteration probably only took a minute but especially in such a situation if half the time is spend finding the beginning of the console output of the last run you’re wondering why this can’t be more efficient :slight_smile:

  1. Windows or OS X user.

  2. Do you mean output channeled to your editor or to the console window that Corona provides. 

The console window AFAIK has no ‘auto-clear’  You can to clear it yourself.

When I want a clear log I just press Ctrl+K (on OSX) in the simulator log window to clear it before I reload the sim.  

I think most people wouldn’t want it to clear automatically, otherwise it’s difficult to compare the output between 2 sessions in order to see the effect that code changes have made.

Yeah, that’s why I wrote that it should be an option as well as an actual example where it is more productive if it would clear automatically :slight_smile:

Anyway - it’s not possible so I’ll just keep searching through the log and/or restart/clear manually … no problem, just a small inconvenience.

On Mac’s CMD-K will clear the console log if it has keyboard focus. On Windows, CTRL-K will to, but it gives you a dialog box confirming it, so it’s a couple of actions there.

Rob

I know and of course I use the keyboard shortcuts on Windows (I couldn’t imagine grabbing the mouse every few seconds while coding :)).

As I said, it’s all great and no problem in general and overall I’m more than impressed by the turnaround times using Corona in combination with live builds running on multiple devices at the same time - fantastic feature. It’s just in situations as described where I may do dozens or even hundreds of runs/tweaks/fixes but only need details every now and then.

If you’re in the flow, it’s sometimes the small things you bump into. F.i. I recently evaluated Love2D because I have some existing projects I might port but they’re built around a lowerlevel code which Loves API is just a better fit. Using VSCode it does support reload/restart on save of a modified file, but each time it does a full restart of the app. It grabs the input focus and the debug console window popups up over my editor window. Of course after doing this 10 times you grooved into alt-tabbing the right amount of times to get back to the Code editor - but it’s just something that could be handled much much better, f.i. just like Corona does :slight_smile:

That said, if I may do these ports, I’ll just grab the Love code and add a work around :slight_smile:

I could see adding a preference where that was an option. Sounds like a great feature request.  Please go to http://feedback.coronalabs.com and create an entry for it and get it voted up.

I could see it being a nice option, each time the simulator starts to start with a fresh console log. 

Rob

Hi,

I suppose this depends on the editor you are using but with Sublime, pressing Win+F10 will run the projects with a clean output.

At the same time, Just saving the script (CTRL+S) will save the script and restart the simulator, without clearing the output.

Good luck!

Anaqim

Ideally, I think, it should be so that we don’t have to restart the simulator and still be able to clear the console for a new run.

I usually don’t close the simulator but just let it reload and restart the app when any file changes - fastest turnaround times and it’s the most flexible too - also the workflow is smoother when you’re using many other filetypes besides Lua sources and these might come frome other editors/tools than Sublime.

The current situation f.i. was that I wrote some custom transition function and I had to debug/tweak it’s code/values so I did some 5-10 runs, watched the simulator and then wanted to examine the console output of the last run (and then repeat the whole thing multiple times).

Of course it’s already blazingly fast using Corona so a whole iteration probably only took a minute but especially in such a situation if half the time is spend finding the beginning of the console output of the last run you’re wondering why this can’t be more efficient :slight_smile:

  1. Windows or OS X user.

  2. Do you mean output channeled to your editor or to the console window that Corona provides. 

The console window AFAIK has no ‘auto-clear’  You can to clear it yourself.

When I want a clear log I just press Ctrl+K (on OSX) in the simulator log window to clear it before I reload the sim.  

I think most people wouldn’t want it to clear automatically, otherwise it’s difficult to compare the output between 2 sessions in order to see the effect that code changes have made.

Yeah, that’s why I wrote that it should be an option as well as an actual example where it is more productive if it would clear automatically :slight_smile:

Anyway - it’s not possible so I’ll just keep searching through the log and/or restart/clear manually … no problem, just a small inconvenience.

On Mac’s CMD-K will clear the console log if it has keyboard focus. On Windows, CTRL-K will to, but it gives you a dialog box confirming it, so it’s a couple of actions there.

Rob

I know and of course I use the keyboard shortcuts on Windows (I couldn’t imagine grabbing the mouse every few seconds while coding :)).

As I said, it’s all great and no problem in general and overall I’m more than impressed by the turnaround times using Corona in combination with live builds running on multiple devices at the same time - fantastic feature. It’s just in situations as described where I may do dozens or even hundreds of runs/tweaks/fixes but only need details every now and then.

If you’re in the flow, it’s sometimes the small things you bump into. F.i. I recently evaluated Love2D because I have some existing projects I might port but they’re built around a lowerlevel code which Loves API is just a better fit. Using VSCode it does support reload/restart on save of a modified file, but each time it does a full restart of the app. It grabs the input focus and the debug console window popups up over my editor window. Of course after doing this 10 times you grooved into alt-tabbing the right amount of times to get back to the Code editor - but it’s just something that could be handled much much better, f.i. just like Corona does :slight_smile:

That said, if I may do these ports, I’ll just grab the Love code and add a work around :slight_smile:

I could see adding a preference where that was an option. Sounds like a great feature request.  Please go to http://feedback.coronalabs.com and create an entry for it and get it voted up.

I could see it being a nice option, each time the simulator starts to start with a fresh console log. 

Rob