this is an idea we’ve been toying with for many years now but never really made it into any release.
In general I’m very interested in any new feature that communicates the execution of Sonic Pi visibly in addition to both the sounds and the logs.
However, this specific idea is an excellent example of something that’s easy to consider but much harder to execute. For example, you say that the log function could be boosted to include the file and line number. Is this the file and line number of the code that triggered the behaviour? What if the buffer was edited since then? What if the file and line number are of a user defined function which has since been deleted from the code, or is in a different buffer?
All these issues arise from the fact that the code running in memory is not of the same form as the code in syntax and there’s no hard bidirectional relationship that allows for this feature to be easily implemented.
If we were to move to something like Scratch where the syntax is visual to start with and have have the visual syntax be the actual data structure that the interpreter worked through, then this difference between syntax and executable program would be reduced.
Another option would be to have immutable versions of the code at the time the run button was pressed and have that be illuminated visually. However, we’re now talking about a considerable departure from the current GUI design. Not that I’m against this - but we’re really rather constrained on resources with me being the only dedicated “full-time” developer and most of that time is spent searching for and working for additional funds and helping the community. What little development time I do have is predominantly spent on ensuring Sonic Pi works on all platforms, fixing bugs etc. I hardly get any time to consider and work on new features at the moment.
So, all that said, if you fancy having a stab at an experimental implementation - I’m sure everyone here would cheer you on enthusiastically and we can see what might or might not work and figure out if a reliable, helpful feature can be shipped!