Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Question Evgeny Shvarov · Dec 4, 2020

Macro to know all the parameters transferred to the method

Hi folks!

Often while debugging you want to know the values of all the parameters.

Using VSCode Debugger is not an option.

What do you use to know what parameters came to the method?

My hope if you have a "magic" macro that will store all the variables with their names into a global?

And share your approaches, please?

Comments

Julius Kavay · Dec 4, 2020

Instead of inserting debug_macros, try Intersystems TRACE utility.

write $$DIR^TRACE("c:\Temp\") ; to set an output directory
write $$ON^TRACE(jobnr) ; the pid of the process you want to trace
; zn "appNamespace"
; do ^yourProgram
; zn "%SYS"
write $$OFF^TRACE(jobnr) ; to stopp the trace
do ^TRACE ; to display the trace result

TRACE displays the function-/method-calls with arguments.

0
Evgeny Shvarov  Dec 4, 2020 to Julius Kavay

Cool! Never knew we have such a utility. 

Thanks!

0
Jose-Tomas Salvador  Apr 15, 2021 to Julius Kavay

Is it documented anywhere? I can't find it in on-line doc.

0
Robert Cemper  Apr 15, 2021 to Jose-Tomas Salvador

@Jose-Tomas.Salvador 
¡Hola Salva! It is ^TRACE.int  in %SYS


 

0
Julius Kavay  Apr 15, 2021 to Jose-Tomas Salvador

Yes, in the ^TRACE routine itself. From command line (in %SYS namespace) issue a "do ^TRACE" and you will get a nice documentation... ;-)

0
Jose-Tomas Salvador  Apr 15, 2021 to Julius Kavay

Thanks Robert and Julius... just wonder if not being documented means that it's not a supported or recommended feature.

0