debuggingapldyalogdyalog-ride

Setting a conditional breakpoint in Dyalog RIDE


In Dyalog RIDE, I know how to set breakpoints that will halt execution on specific lines in the APL source. Is there a way to make a breakpoint conditional so I can stop at a line only if a particular set of conditions are met, e.g. 0<+⌿⍵?


Solution

  • There's no IDE (or RIDE) support for this, but with a simple change to the source code, you can achieve the effect.

    In a tradfn:

        :If 0<+⌿var
    🔴  :Endif
    

    In a dfn:

        0<+⌿⍵:{
    🔴  }⍬
    

    If the condition doesn't hold, we skip the line that would have stopped execution.