Rob,

I've gotten a little mileage from launching ChucK under gdb:

That sounds like a worthwhile thing to try next time. I got it now, going by ear, trying lots of things and a few debug prints here and there to home in on it.

I do think we could do better though; this seems like a prime example of a case where the whole integration of the VM with the compiler and the parser could become useful.

Tom,

These "bytcode instructions" are those linked more or less linearly to the file? What I mean is could one home in on the bug by intentionally having a array go out of bounds, then checking whether this results in a higher or a lower number?

Another solution would of course be to look more closely before copy-pasting a entire loop and verifying whether all of the variables still make sense in the new scope... *cough*

Thnaks,
Kas.