You could try %SYS.MONLBL. This is intended as a performance trace, but it MAY work for this purpose too. You would have your application running in one session and get the the process is for that session. Open a new session and run %SYS.MONLBL. Choose the options to monitor ALL routines and the specific process id (PID) where you are running your application. Go back to the application session and perform the function you want to trace. Immediately go back to %SYS.MONLBL and generate the report before doing anything else in the application.
NOTE: This might not work with deployed code and even if it does will likely not provide any details of the deployed programs. Hopefully it will at least show an entry for the deployed routine so you can see what is being called.
Do you need something more than simply attaching a debugger to the process and stepping through the code?
With the Serenji debugger you have precise control over stepping into or over blocks of code and you can mask out library code that you already know about (or don't want to know about).
using LOG^%ETN gives a full stack trace. without breaking the process
you just have to place it into your code at the critical points.
https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=GCOS_errors#GCOS_errors_log_etn
in case of deployed code, where i can't embed into the code, how could we trace?
nowhere. It's the purpose of deployed code not to be hacked nor debugged
There are 2 utilities which may help you:
- PROFILE https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
- PERFMON https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
Both can be used for routines/classes in deployed mode.
You could try %SYS.MONLBL. This is intended as a performance trace, but it MAY work for this purpose too. You would have your application running in one session and get the the process is for that session. Open a new session and run %SYS.MONLBL. Choose the options to monitor ALL routines and the specific process id (PID) where you are running your application. Go back to the application session and perform the function you want to trace. Immediately go back to %SYS.MONLBL and generate the report before doing anything else in the application.
NOTE: This might not work with deployed code and even if it does will likely not provide any details of the deployed programs. Hopefully it will at least show an entry for the deployed routine so you can see what is being called.
Good luck
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
Adel
Do you need something more than simply attaching a debugger to the process and stepping through the code?
With the Serenji debugger you have precise control over stepping into or over blocks of code and you can mask out library code that you already know about (or don't want to know about).
Yes, use the TRACE utility.
See also https://community.intersystems.com/post/macro-know-all-parameters-transf...