Yes, that is what I usually do for debugging anonymous verbs. It works but seems discouraging writing compound verbs. On May 29, 2016 10:19 PM, "Henry Rich" <[email protected]> wrote:
> Yes, that's because what is running is not a named definition. (It's 3 : 0 > not t2) > > In the jqt debugger I changed things so that if you set a stop in t2, the > debugger splits the definition into > > t2compound =: original t2 > t2 =: t2compound"0 > > and then puts the stop into t2compound. If you are using jqt you can set > a stop before running the program, to get a good stop. > > If you are not running jqt I don't know what the best solution is. You > could split the definition by hand. > > Or, maybe we could make up a name for the unnamed explicit definition, and > show that on the stack. That's a design change that would require some > thought and discussion. > > Henry Rich > > On 5/29/2016 10:12 AM, bill lam wrote: > >> Anther thing about debug stack is that it cannot show the correct >> line number if the verb is defined by 3 : 0"n or n&$: : (4 : 0) >> >> eg, >> t1=: 3 : 0 >> 1 >> t2'' >> 4 >> ) >> >> t2=: 3 : 0"1 >> 1 >> 2 >> 3 >> 1+'a' >> 4 >> 5 >> 6 >> ) >> >> dbr 1 >> t1'' >> |domain error: t2 >> | 1 +'a' >> dbctx'' >> @@ t2[0] *v @@ /home/bill/a1.ijs >> 3 : 0"1 >> >>> [0] 1 >>> >> [1] 2 >> [2] 3 >> [3] 1+'a' >> dbstack'' >> +----+--+--+--+----+------+----+ >> |name|en|ln|nc|args|locals|susp| >> +----+--+--+--+----+------+----+ >> |t2 |3 |0 |3 |++ | |* | >> | | | | ||| | | | >> | | | | |++ | | | >> +----+--+--+--+----+------+----+ >> |t1 |0 |1 |3 |++ |+-++ | | >> | | | | ||| ||y|| | | >> | | | | |++ |+-++ | | >> +----+--+--+--+----+------+----+ >> >> However it works if t1 and t2 are >> >> t1=: 3 : 0 >> 1 >> t2"1 '' >> 4 >> ) >> >> t2=: 3 : 0 >> 1 >> 2 >> 3 >> 1+'a' >> 4 >> 5 >> 6 >> ) >> >> dbr 1 >> t1'' >> |domain error: t2 >> | 1 +'a' >> |t2[3] >> dbstack'' >> +----+--+--+--+----+------+----+ >> |name|en|ln|nc|args|locals|susp| >> +----+--+--+--+----+------+----+ >> |t2 |3 |3 |3 |++ |+-++ |* | >> | | | | ||| ||y|| | | >> | | | | |++ |+-++ | | >> +----+--+--+--+----+------+----+ >> |t1 |0 |1 |3 |++ |+-++ | | >> | | | | ||| ||y|| | | >> | | | | |++ |+-++ | | >> +----+--+--+--+----+------+----+ >> >> >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
