[Swift-devel] visualize your code as it executes

Ben Clifford benc at hawaga.org.uk
Thu Mar 1 04:49:25 CST 2012


On Mar 1, 2012, at 5:19 AM, Ketan Maheshwari wrote:

> This is a nice page showing visualize as you run code:
> 
> http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit
> 
> Relavant to the try Swift online venture.
> 
> (from google+ python stream)

I've pondered about this before, but more from the perspective of visualising performance on large execution runs, which I think works differently from a "try some simple code here" visualisation.

One thing that is very different in Swift is all the parallelism. It doesn't make sense for a large run, but for a small run where there are (for example) not too many branches in a foreach loop, then using that style of interface to graph the progression of a DAG might be interesting.

There was some DAG generation stuff long ago - I have no idea what state it is in now. It started to run into trouble when there were non-trivial data structures.

For stepping through code, you can (I think) pretty much always safely run swift code as a single thread, which would be much more amenable to single stepping like in that example. But I don't really know how harmful that would be to understanding the parallelness, compared to the benefit of being able to see whats going on step by step.

-- 




More information about the Swift-devel mailing list