Thanks a lot, Dmitrij, I will do that. I think one of the reasons people don't leave feedback because they don' know how. I did not. I would suggest modifying the Like/Dislike AI page functionality appearance to, say, Like/Dislike/Review so the feedback possibility would be much more prominent.

Why do I need AI for these questions? Speed of coding, that simple. I use AI much less than many programmers nowadays and I really should use it more often, maybe ChatGPT or Codex though, since Ask AI regularly has problems with very simple questions, like the ones above. What are chances it would handle more complicated situations better?

I am not a specialist in AI in general, but I was under impression that AI could or should process not only already posted to it questions, but selected body of other types of knowledge as well. In this case, InterSystems documentation and existing Iris/Cache code, be it internal or external, seem very useful to train Ask AI on. Say, number 3 is both in code and documentation. Probably someone used it already, or a similar query. 

Example 2. For what is worth, I dealt with ^ROUTINE, ^rOBJ, or rINDEX multiple times, using their contents, not changing programmatically, except for rebuildIndex.

Also, if AI knows, that is faster than browsing documentation or trying to remember functionality that I rarely use.

Lastly, I know that ChatGPT usage and budget is incomparable. Still, could anything be done about Ask AI knowing less about ObjectScript that ChatGPT?

Thanks, Stephen. That was exactly my today's question, the result is below. 

My main issue in this post is the AI we have is too feeble, perhaps undertrained. Secondary issue is to be able to complain about specific AI problems in a dedicated place.

Anna Golitsyna · Nov 19, 2025 go to post

In my case ClientExecutableName is empty when run from Studio. I also run ZW myproc but did not see anyting definitive inside.

Anna Golitsyna · Nov 19, 2025 go to post

I am not sure what exactly does it represent but here is the full value when code is run from Studio 2017: $STACK(0,"PLACE")=zDebugStub+30^%Debugger.System.1 +N. When the same code is run from Terminal the value is $STACK(0,"PLACE")=@ +N1. N and N1 are integers, not sure if always the same.

Anna Golitsyna · Nov 18, 2025 go to post

Using your stack idea, code below seems to work both on Iris and Cache 2017:
When run from Studio $STACK(0,"PLACE")["DebugStub" is 1. The same is 0 in the terminal

Anna Golitsyna · Nov 18, 2025 go to post

Unfortunately, this code does not work in Cache 2017 either. The return values when run in Studio are 0. 1972 apparently does not work for the same obscure reasons Robert's suggestion did not work.

Anna Golitsyna · Nov 18, 2025 go to post

Unfortunately, that does not work. It does indeed contain 1972 when code is not running and does not contain it once it is running. Below is a copy-paste from the Output window.
w $I
|TCP|1972|50524
Debugger executing 'patchTM^FUNCT'
Executing patchTM^FUNCT
w $I
|TCP|59056
Debugger stopped.

Anna Golitsyna · Sep 25, 2025 go to post

From AI:

Yes, it is possible to call a dialog with a single input text field in the UserAction method in a class that extends %Studio.Extension.Base. Here’s how it works:

  1. Inside the UserAction method, you can set the Action parameter to 7. This tells Studio to display a dialog box with a textbox and Yes/No/Cancel buttons.
  2. You can use the Target argument to provide the dialog text, and the Msg argument to set the initial text in the textbox.
  3. After the user interacts with the dialog, their input can be processed in the AfterUserAction method 1.

For example:

Method UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean) As %Status
{
    If Name="SourceControl,DialogWithTextField" {
        Set Action = 7
        Set Target = "Enter your input:"
        Set Msg = "Default Text"
    }
    Quit $$$OK
}

In the AfterUserAction method, you can handle the user’s response:

Method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String, ByRef Reload As %Boolean) As %Status
{
    If Answer = 1 {
        Write !, "User entered:", Msg
    }
    Quit $$$OK
}

Ensure that this class is registered as the source control class for the namespace if required 1.

Anna Golitsyna · Aug 12, 2025 go to post

It is very verbose but yes, I got it working now too. Thanks, Robert! It is interesting that the resultant file lists only routine names but not the labels. Instead of a label name, it lists the label line number.

Anna Golitsyna · Aug 11, 2025 go to post

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>

Anna Golitsyna · Aug 8, 2025 go to post

Thanks, Stuart. Correct me if I am wrong but I would need to install such a function in multiple places and that's exactly what I am trying to avoid. I did use $STACK in less involved situations before and it is very useful in its own right.

Anna Golitsyna · Aug 8, 2025 go to post

Thanks, Timo. I used this profiling utility before and it's very good for its purposes but now I am interested in sequence of function calls and MONLBL does not provide that.

Anna Golitsyna · Aug 7, 2025 go to post

As far as I understand, this is to examine the stack in a predetermined piece of code. I have used it in this capacity as well, but now I'd like a recording without explicitly calling stack in each involved function.

Anna Golitsyna · Jul 9, 2025 go to post

Very good and customizable
TRY {
ex= ##class(%Exception.General).%New("test",1,data1,data2)
throw ex}
CATCH ex {
ex.Log()
}

Anna Golitsyna · Jun 9, 2025 go to post

Thanks a lot everybody for your input. I need a bit more time to mark your replies as answers but I will do that.

Anna Golitsyna · Jun 3, 2025 go to post

Thanks a lot! I successfully tested both and one correction: the date is not in MUMPS format. It works with the 06/03/2025 format though.