Debugging inside a function

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Debugging inside a function

Post by durana » Tue Mar 29, 2005 9:45 am

Hello All,

I use the debug function (alt d, w) in macro scheduler and this works fine for me.
In my macro I call a function, and I want also see the debug of this function in the window beside my macro.

How can I do that, is that possible ?

my script :


vbstart
function nummerwerkdagweek(datum)
nummer=datepart("w",datum)
nummerwerkdagweek=nummer

end function

vbend

getdate>datum
vbeval>nummerwerkdagweek(datum),bepaaleerstewerkdag
dayofweek>nummervandaagweek
if>nummervandaagweek=bepaaleerstewerkdag,verdermaand,endifmaand

label>verdermaand
messagemodal>hallo
Label>endifmaand
messagemodal>dit is het einde
Label>end


nummervandaagweek=3
bepaaleerstewerkdag=7 ,output what I see, but I expect also 3 <---

therefor I want to debug also the function nummerwerkdagweek(datum)

Thanks Duran

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Mar 29, 2005 3:45 pm

Hello Durana,

If you refer to your VB function, ie, nummerwerkdagweak, then I'm afraid it can't be debugged within Macro Scheduler's Editor.

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Thu Jun 09, 2005 7:50 pm

ok,

I think it would be great if that could be.
Maybe in the next deployment.

Durana

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jun 10, 2005 1:44 am

One thing you could do in VBScript is to insert a bunch of MessageBox lines with a pause, playing back the variable values.

Or write the variables to a file and use Macro Scheduler to read the file for you.

When not needed, just turn the lines into remarks until you need to troubleshoot again.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Fri Jun 10, 2005 8:11 am

Thanks Bob,

That is good workaround.

Regards Durana

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts