View Single Post
  #9  
Old 11-22-2005, 07:09 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
debugging script

<quote>Using v6, you could add project-level step script events to log the problem macros before and after each step to isolate when they are changing or getting deleted.</quote>

the free v6 won't run my projects since they are lengthy. I don't think we're prepared to upgrade yet.

<quote>In v5, you would have to add the script code to each step's script code (you can multi-select steps and edit step script, but it will replace any existing script code for those steps).</quote>

I can use the save to write out the macros each step, and manually check for difference, but it would be nice to do a whole run up to where the problem happens, and diff the macro output between each step.

I'll save each macro collection on every step as (STEPNUM_MACROCOLLECTION.macros) where stepnum gets incremented every time the script runs.

Where DEBUG_STEPNUM is project macro starting at 1,

<code>
set stepNum=application.macros(vbldProject).Item("DEBU G_STEPNUM")
stepNum.Value = CInt(stepNum.Value)+1
set projDir=application.macros(vbldSystem).Item("PROJD IR")
set projRoot=application.macros(vbldSystem).Item("PROJ ROOT")
Application.Macros(vbldMacroTemporary).Save projDir.Value & "." & stepNum.Value & "." & projRoot.Value & ".TEMP.macros"
Application.Macros(vbldMacroProject).Save projDir.Value & "." & stepNum.Value & "." & projRoot.Value & ".PROJ.macros"
Application.Macros(vbldMacroGlobal).Save projDir.Value & "." & stepNum.Value & "." & projRoot.Value & ".GLOBAL.macros"
Application.Macros(vbldMacroSystem).Save projDir.Value & "." & stepNum.Value & "." & projRoot.Value & ".SYSTEM.macros"
</code>

Last edited by epu; 11-22-2005 at 08:09 PM.
Reply With Quote