A CodeFlow blog

about live coding and more…

CodeFlow 0.9.10 improves debug features


It has been almost two weeks since I released CodeFlow 0.9.10 and it is more than time for me to write a few words about the changes in this version.

CodeFlow v0.9.10, that can be downloaded here, is mostly focused on improving the debug experience when developing code in Lua.

The Lua Command Editor can now interpret commands in the context of the currently-selected call-stack frame. This means that the Command Editor can execute virtually any sequence of Lua code, that would be valid at the current line of the selected call-stack function. Executed code has read / write access to all variables visible at the current source location: this includes local variables, up-values, var-args and free names (i.e. Lua env-aware globals).

CodeFlow also features an improved Variables Inspector that displays more information about the current state of your program: it allows the visualization of masked local variables, and the display of custom Lua environments. In addition, the Variables Inspector now includes a simple type-aware variable editing capability, and other small improvements that make it easier to use and very reliable.

I will illustrate these debug features with a simple screenshot of a test program:

CodeFlow 0.9.10 new debug features

Here the execution is stopped at line 23 in a function named square, where a lot of variable masking takes place.

Variables Inspector

To start with, the function defines a local environment on line 12, that masks the inherited _ENV up-value (that was set at line 4); you can see in the Variable Inspector that the masked _ENV up-value is dimmed but still accessible, and you can easily identify the active _ENV, which is a local variable.

In addition, many variables in the square function are named x. This is really confusing and certainly not a good programming practice, but this is still syntacticly-valid Lua code. Fortunately, the CodeFlow Variable Inspector will help you to clarify things.

The last x in the list is not dimmed, so it is the active variable x; its value has been modified by the last step in the code, as indicated by the yellow highlight on the Craig value. Other variables called x are dimmed, so they are masked; you can locate any them precisely in the source code by selecting it in the variable inspector, like here thexwith value Bob: we can see that it is set on line 21 and never read.

Lua Commands

Now, we can have a look at the Lua Command Editor, in the Lua Console pane. The Lua Console title indicates the context in which the command will be executed, here in function square, line 23. The code of the command is colored appropriately for this context, so it is easier to detect typing errors: you can see that huge and print are colored as up-values, and x is colored as a local variable, which is precisely what we expect.

What happens if we execute the command?

CodeFlow 0.9.10 new debug features

We can see that the values of variables huge and x have been modified (highlighted in yellow), and the console output contains the string printed by the command, with the right value for x.

Other improvements

In addition to these debug-related improvements, CodeFlow v0.9.10 fixes a number of bugs in various parts of the system and improves the reliability of the connection between CodeFlow and target iOS device running the application.

Post a Comment


Recent posts

Blog Post
Aug 1, 2016

CodeFlow 1.0.2

CodeFlow 1.0.2 is a minor release that focuses on improving the Live Application Developer's Experience.

Aug 1, 2016
Blog Post
Jun 16, 2016

CodeFlow 1.0.1 and WWDC 2016

The just-released CodeFlow 1.0.1 brings support for the new iOS 10, tvOS 10 and macOS 10.12 announced at WWDC 2016 this week.

Jun 16, 2016
Blog Post
Jun 9, 2016

CodeFlow turns 1.0

It has been some time since the last beta of CodeFlow, version 0.9.20 was released in January this year. And all this time, we have worked very hard to improve CodeFlow, and to turn it into an effective Application Development System that we love to…

Jun 9, 2016

Last tweets

Jun 8, 2018
@JLJumpertz
✅ Wow, @celedev CodeFlow looks really good in dark mode on macOS 10.14 Mojave! 😃
Still a work in progress, but it took me only a few hours to reach this point, while keeping it compatible with macOS 10.11+ 😎
CodeFlow = live-code native iOS apps in Lua celedev.com
Jun 8, 2018
May 17, 2018
@JLJumpertz
🎉🥂Time-Flow, an iOS app created with @celedev CodeFlow by @alf147 is on the AppStore!
The approval process took less than 24 hours. 😎
#LuaLang #livecoding #iOS
itunes.apple.com/us/app/time-fl…
May 17, 2018
Apr 2, 2018
Minor CodeFlow update today: v1.2.3 fixes an issue with Xcode 9.3. Check for update or download it directly from celedev.com/en/download/
Apr 2, 2018
Feb 12, 2018
New CodeFlow version 1.2.2 today: it solves an error that could occur when calling certain kinds of Swift closures or ObjC blocks from Lua.
Thanks @alf147 for reporting the issue! 😀
Check for update in CodeFlow, or download version 1.2.2 from celedev.com/en/download/.
Feb 12, 2018
Feb 8, 2018
The LuaPanda 🐼sample application has also been updated for CodeFlow 1.2.1.
To get it from GitHub: github.com/celedev/LuaPan…
Feb 8, 2018
Feb 8, 2018
CodeFlow 1.2.1 is now available for upgrade. This is a bugfix release recommended to all users. 😎
Check for update in the appplication,
or download it from celedev.com/en/download/,
or simply read about the changes here: celedev.com/en/download/co…
Feb 8, 2018
Feb 2, 2018
@JLJumpertz
Live iOS app development strikes back!
Version 1.2 of CodeFlow is out, with lots of improved features, for a unique interactive native app development experience. 😀
- download celedev.com/en/download/
- changelog celedev.com/en/download/co…
(by @celedev)
Feb 2, 2018
Dec 7, 2017
🛠New CodeFlow SDK Bindings are available for all supported Xcode versions: 9.2, 8.3, and 7.3. 😊
celedev.com/en/download/
Dec 7, 2017
Aug 9, 2017
🛠CodeFlow SDK Bindings for Xcode 9 beta 5 are available for download. Enjoy! 😊
celedev.com/en/download/
Aug 9, 2017
Jul 11, 2017
New APIs in Xcode 9 / iOS 11 beta 3? CodeFlow supports them from day 1. 😀
🛠 Download updated OS SDK bindings from celedev.com/en/download/
Jul 11, 2017
Jul 2, 2017
CodeFlow 1.1.1 is out, and supports real-time native app development for iOS 11 and macOS 10.13.
Check for update or celedev.com/en/download/
Jul 2, 2017
Dec 5, 2016
@JLJumpertz
"Programming iOS in Lua - A bridge story"
Slides of my talk at Lua Workshop 2016 are here: slideshare.net/jljumpertz/pro…
#lualang #iosdev
Dec 5, 2016
Oct 11, 2016
Little Lua red Panda is now on GitHub! github.com/celedev/LuaPan…
A SceneKit 3D game in #LuaLang with dynamic update of all 3D assets and code
Oct 11, 2016
Oct 3, 2016
CodeFlow 1.0.3 is out!
⚡️ Live SceneKit assets, Sierra support, and more…
celedev.com/en/download/#c…
#lualang #iosdev
Oct 3, 2016
Oct 1, 2016
@aligatr
@Javi @nicklockwood same and also sad they didn't mention Redux realm.io/news/benji-enc… nor @celedev for Live Reloading & Faster iterations
Oct 1, 2016