Debug Methodology

new topic     » topic index » view thread      » older message » newer message

I've set up a debugNote() function whereby if debugMode = ON then the 
function will write some debug info to a text file. My question is 
this... would you have each function provide its own debut note? For 
instance...

-- METHOD ONE
-- each function provides its own debug note
function one()
    debugNote("Entered function one()")
-- do some stuff
    debugNote("Exiting function one()")
    return 1=1
end function

procedure one()
    junk = one()
end procedure

-- METHOD TWO
-- caller must provide debut note
function one()
-- do some stuff
    return 1=1
end function

procedure one()
    debugNote("Going to function one()")
    junk = one()
    debugNote("Returned from function one()")
end procedure

-- END EXAMPLES

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu