Page Bottom  Documentation

Code Walker

Open the function GetRealTime. In the vertical grey strip on the left, click with the left mouse button beside line 10 (the line that calls WCreateFile). A big red dot appears. This is a Stop. Save the function (either Save or Save and Close.)

In the session Manager, go to the Walk menu and check Show CodeWalker. This should display the CodeWalker window above or below your command window (you can adjust for preference -- at the bottom of the Walk menu.)

Now run your function. When it gets into GetRealFileTime, it will stop and the CodeWalker window will highlight the current line, the one that will be executed next. Now you can either execute that line (F10 or toolbar button) or step into any functions on that line (F11 or toolbar button.) You can hover your mouse over variable names to see their current values in tooltips, or put the focus back in the session manager pane and execute APL statements (if you have Multiple Execution enabled.) You also can open the current function, edit and save it and the changes are immediate (except you can't save within a :for loop.)

Keep stepping this way until you find out what you need or the function completes. Or Click the big green arrow button (F5) to just resume execution.

That's really all there is to it (not :-) Those are the basics. The best trick (other than dynamic editing) is moving the current line, thereby skipping lines you want to bypass temporarily, by selecting (moving the cursor by clicking with the mouse on) the desired line in the CodeWalker window and pressing Ctrl+F5 or the "Set next statement" toolbar button, then step or resume.

To remove Stops, open the function, click the big red dot so it goes away, then Save the function. You can also set and clear stops dynamically in the CodeWalker window, although they will persist in the saved version of the function until you clear them (or re-def the function.) But maybe that's for lesson two. And there's more.

One warning: don't set stops on :case statements in :select structures -- crashes APL. You can stop on lines within a case though. Also don't bother setting stops on blank or commented lines except line [1] -- APL won't stop.

Seems like a lot when typing it out, but it really is very simple once you do it a couple of times. Somehow I caught on about a year ago, and it is an extremely useful tool. I highly recommend investing the small amount of time and effort it takes to learn it.


horizontal line
to home page e-mail Page Top