Author Topic: VLIDE - Animate only part of the code  (Read 1282 times)

0 Members and 1 Guest are viewing this topic.

Grrr1337

  • Swamp Rat
  • Posts: 812
VLIDE - Animate only part of the code
« on: July 17, 2016, 01:38:20 AM »
Hi guys,
I'm kinda newbie when it comes about using VLIDE, and I've been reading some tutorials from Lee Mac's website, about debugging the code.
So my question is: Is it possible to animate only part of the code ?

Say I run first time the code in VLIDE, determine where did the code fail ( using "Last Break Source" ).
Then I watch the variables, and animate the code - to understand exactly why it did fail.

But the problem is:
 If the code is very long / or there are subfunctions with long loops, and I set my animation delay for 5 seconds (to analyse more carefully whats happening)
 I have to wait like 5-10 minutes, so the animation gets to my desired part, where the failure is located.
And I need exactly this... analyse only part of the code, not the whole code (because I know whats happening elsewhere, except the desired "area").
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VLIDE - Animate only part of the code
« Reply #2 on: July 17, 2016, 12:32:48 PM »
Set Break Points to pause program evaluation at the expression of interest, and then enable Animation before contuing with the evaluation - see here for more information.



irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: VLIDE - Animate only part of the code
« Reply #3 on: July 18, 2016, 02:20:27 AM »
Personally I never use the animate feature. I prefer going to the manual stepping instead. Placing break points (F9) where I think I would like to start "seeing execution". Thereafter it's F8 to go into the expression (e.g. if one of my own subrouties are called), Shift-F8 to step over such, Ctrl-Shift-F8 to step out of the current block and Ctrl-F8 to let it run further (e.g. until the next breakpoint). Not to mention, while you're doing this you may just notice some further code ahead - at which point you can move the cursor and place another breakpoint there - then Ctrl+F8 to run through a large loop instead of going through each of its iterations.


I just find it a LOT more efficient to control exactly when, where and how such debug steps happen, instead of attempting to "watch a movie" of my code. Also means you're not harried when you then want to check values inside of variables through the watch / inspect windows.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.