Thanks, Robert. It is available in 2017, but I was not able to set it up yet. Something is still wrong the way I run it, please see below. I start debugging, stop at a breakpoint and input the $J value.

%SYS>D DIR^TRACE()
 
%SYS>D ^TRACE
 
TRACE utility for Cache. You can signal a process to write a record of all
procedure, function, or subroutine calls to a file. Then use this utility to
interpret and display the trace. The trace file is named: CacheTrace_'pid'.txt
 
Use $$DIR^TRACE(dir) to set the directory where the file(s) should be written
(process must have create/write access to the directory). $$DIR^TRACE() returns
the current directory for trace files.
 
Use $$ON^TRACE(pid) to start the trace and $$OFF^TRACE(pid) to end the
recording. Then just run ^TRACE to see the results.
 
Process ID for trace file: 5352
Output to: <0> TestAG.txt
 
Processing file ...
 
-1,Unable to open file CacheTrace_5352.txt
%SYS>

I did not try it myself, but I talked to other people and searched more, and it seems that using VS Code (as opposed to Iris/Cache Studio) combined with Copilot is currently the best available way of incorporating AI into ObjectScript/MUMPS coding: Coding InterSystems ObjectScript with AI Copilot. @Evgeny Shvarov, would you agree? Would you like to add anything on the discussion subject?