j9.6 beta on-the-fly debugging

15 views
Skip to first unread message

Jan-Pieter Jacobs

unread,
Aug 24, 2024, 2:59:34 PMAug 24
to fo...@jsoftware.com
Hi all,
I wonder whether I'm missing something: I can't get the on-the-fly debugging in j9.6 beta(15) jconsole to work.

   foo =: {{ 'a'+1[ echo'bar'[ bar=. 'test'}} NB. test verb, causing an error
   foo 1
bar
|domain error in foo, executing dyad +
|x is character
|   'a'    +1[echo'bar'[bar=.'test'
Press ENTER to inspect                 NB. I pressed enter here.
   
dbr 0 to end inspection; use y___1 to look inside top stack frame (see code.jsoftware.com/wiki/Debug/Stack#irefs)
   bar
|value error: bar  NB. why can't I access bar?
*foo[0]
   dblocals''  NB. dblocals indicates bar should be a local
┌────────┬──────────┐
│dblocals│          │
├────────┼──────────┤
│foo     │┌───┬────┐│
│        ││bar│test││
│        │├───┼────┤│
│        ││y  │1   ││
│        │└───┴────┘│
└────────┴──────────┘
   dbr 0      NB. exit on-the-fly debug
   dbr 1     NB. regular debug
   foo 1     NB. try again
bar
|domain error in foo, executing dyad +
|x is character
|   'a'    +1[echo'bar'[bar=.'test'
|foo[0]
      bar    NB. here I can access bar
test

If I can't access and manipulate locals in the function causing the error, the on-the-fly debugging is not really helpful to me. Does anyone know what I'm doing wrong?

Thanks,
Jan-Pieter

Henry Rich

unread,
Aug 24, 2024, 3:09:56 PMAug 24
to fo...@jsoftware.com

To access bar you have to use

bar___1

You are not in the definition that failed. You have gone back to console level, but you can look into the stack frames that you see with dbs''. You just have to qualify the name with ___n.

Henry Rich


To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.
Reply all
Reply to author
Forward
0 new messages