> eval will help where value wouldn't, indeed.
>
>> to show the values of the arguments and locals in a function you could access them from the .z.s definition and use eval to get their values:
>>
>> q)f:{[x;y;z]a:100;break;b:1}
>> q)f[1;`a;1 2]
>> {[x;y;z]a:100;break;b:1}
>> 'break
>> q))show raze{enlist[x]!enlist eval x} each raze value[.z.s]1 2
>> x| 1
>> y| `a
>> z| 1 2
>> a| 100
>> b| ()
note that this only works in a debug shell
q){eval`x}1
{eval`x}
'x
@
![-6]
`x
q))eval`x
1
q))
but in the debug shell, it even works across scopes (as seen above)!
q){a:1;eval`a}[]
{a:1;eval`a}
'a
@
![-6]
`a
q))eval`a
1
q)){eval`a}[]
1
q))
interestingly `.z.s binds to the outer function here, not the inner one:
q){break}[]
{break}
'break
q)){eval`.z.s}[]
{break}
q))
using these points, i'd write
q)vars:{show n!eval each n:raze get[eval`.z.s]1 2}
then
q)f:{[x;y;z]a:100;break;b:1}
q)f[1;`a;1 2]
{[x;y;z]a:100;break;b:1}
'break
q))vars[]
x| 1
y| `a
z| 1 2
a| 100
b| ()
q))
note that "uninitialized" locals have the value (), which may help give a rough idea of where in the function you've broken