Rev Editor

Want to edit something? We can help! 
« Back to blog

De-construct your code with tRev's decoder!

(download)

Use the Check for Updates menu item under the Help menu to update your tRev so it has the Decoder!

Since this video was made, tRev's Breakpoint Manager has been spiffed-up and enhanced.

If you are not seeing breakpoints populate with data, remember the following:
  1. You have to have Rev in debug mode.
  2. Breakpoints don't get data until you run the code in Rev.
  3. Use the Decoder to set and clear breakpoints, don't try it by hand. Plain breakpoints created by hand are ignored by tRev.
You will have to quit tRev and restart it after updating to the Decoder. You do not, however, need to re-install with option key + launch. A simple restart is required because the Decoder uses a new data broker, and it won't be in use until you restart tRev.

Some Tips
  • If you have dirty tabs (uncompiled code), you will be encouraged via dialog to close or compile all code before decoding it. Otherwise, code can get over-written.
  • When you set a breakpoint in decode mode, not only will your code be compiled with the new breakpoint, but its stack will also be saved. This will keep you from accumulating orphaned breakpoints in decoder's database. This saving will NOT create archived copies of the stack. You can do that with the Save, Archive & Compile menu item under the File menu (command+s).
  • When using the Breakpoint Manager (command+shift+b), you can now double click a line in its list of breakpoints, and the code for that object will appear in a tab with the appropriate breakpoint line selected in the code.
Also: there is now a new preference that lets you turn off or on auto-complete (aka clairvoyance).

You should click below to...

Loading mentions Retweet
Posted by Jerry Daniels 

Comments (11)

Aug 25, 2009
lenmorgan said...
Just finished watching the video. That's a great feature but I've got a couple of questions and a feature request (of course):
1) If you have a breakpoint in say a repeat loop, does it remember every pass through the loop or only the last one?

2) It appeared in the video that the decoder just passed over some of the breakpoints, storing the info I'm sure, but not stopping. Does anything cause the decoder to stop (a la the debugger) or do you have to do something to trigger it to stop so you can look at your code?

3) Can the database be dumped to a file for later printing? Sometimes the bug takes looking at for a while which I prefer to do with paper rather than on the screen. I could live without it but it might be handy.

4) Is there a "trace in time" feature or display mode where you might be able to see not only what the decoder found at certain breakpoints but also when they happened in relation to each other (I'm thinking along the lines of a repeat loop that might have an if/else in it and it takes the "if" branch most of the time but sometimes takes the "else" branch. It might be nice to see when it takes each.

I know I'm suggesting a lot of complexity which is specifically what you are NOT trying to do with this and none of the above are game changers for me. Just nice little things to have.

As far as the feature request, it seems to me that one handy "Other" would be the defaultFolder. It would be nice to know where rev is looking for something. I'm not sure you can do that since you have to change to the tRev program to capture the state (I'm assuming) but it would be very nice to have.

That's enough until I actually start playing with it.

len morgan

Aug 25, 2009
Jerry Daniels said...
1. Last loop gets recorded in this version.

2. Decoder is not modal. doesn't stop for anyone or thing. I was gonna have it go to tRev and show decoder pane on designated breakpoints, but it was over kill.

3. Could do reports with database. good idea.

4. Defaultfolder...great idea. should be under "other". No trace. Not a debugger, but there is a lot that could be done with the feature to make it even more useful. I like the timed reports idea.

Aug 25, 2009
Sarah Reichelt said...
I updated and then tested this new feature but kept getting a script editor on the breakpoint lines. So I quit and restarted tRev with the Option key down to force a re-install. Now the decoder works perfectly, so just a suggestion in case anyone else is having problems.
This was possibly because I didn't get the first update with the decoder but skipped to the second.

Anyway, it looks brilliant Jerry and certainly supplies what I need. I had need of a debugger just a few days ago and had to turn off tRev (gasp) and go back to the Rev editor :-( Now I will be OK.

Len, with wanting decoded info in loops, you could add conditional breakpoints e.g.

repeat with x = 1 to 10
if x = 1 then
breakpoint #123456789
else if x = 10 then
breakpoint #987654321
end if

-- do other stuff
end repeat

A bit more verbose, but I presume it would work.

Aug 25, 2009
Severin Swensen said...
Very nice, I may have to break down and purchase this.
Let me make a suggestion that you may consider for a future version. If possible every time you enter a loop count the iteration so that the user can see the count when inspecting a run. And for every if/else structure indicate the number of times you processed the if part and the number of times the else was executed. The total if and else iterations should equal the iteration count of the enclosing loop count.

Oh and say hello to U.S. Grant when you see him :)

Aug 26, 2009
Obleo said...
Thanks for this update, It helps out so much. Keep up the great job Jerry.
Aug 27, 2009
Obleo said...
is there some sort of log, on what is updated or changed when we click the blue update link. just wondering.
Aug 27, 2009
Jerry Daniels said...
Not at this time, no log. But that's a good idea.

Aug 27, 2009
Jerry Daniels said...
I have revised the initial tRev Decoder post with helpful hints. Worth a read.
Oct 19, 2009
vamp07 said...
I hope you can add a way to the decoder to do captures as you loop. Many times the stuff I am looking to debug is in a loop and it's not the last pass I am looking to capture.
Oct 19, 2009
Jerry Daniels said...
Storing unique context data for every cycle of a loop would 1) make the loop run slowly and 2) destroy much of the simplicity of the decoder in terms of workflow and UI.

Most of us write an extra IF within the repeat loop to sniff the variable(s) we're interested in. The IF, of course, would have one or more decoder breakpoints within it. Not very onerous at all.

Oct 19, 2009
vamp07 said...
Cool. I thought this might be possible but I was not sure. That would do the trick and I agree with keeping it simple and fast.

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter