User Answers

I fully agree that using the line by line monitor is the way to go, take a look at  %Monitor.System.LineByLine.cls which provides an API to turn this on/off and get information out of the line by line monitoring.

Also for mapping INT lines back to source lines you can look at the API in %Studio.Debugger.cls in method  SourceLine. This class does say it is internal but I think this particular method should be fine to use.

This is not possible, as you suggest you should put the methods you wish to call at generator time in another class and make sure you create a dependency with this other class using the 'DependsOn' keyword to make sure we fully compile this other class first.

It is a bug due to Ensemble code adding routines to the set of items generated by the class but not setting the timestamp for these. So when we look at all routines generated from this class and verify the timestamps of each one has not changed these are different and so cause the flag showing it is not up to date.

As there is pre-existing code that sets this $$$cCLASSroutines array manually I updated the logic to only verify timestamps that are not "" which should fix this problem. This fix was submitted as MAK4540.

If you want the sizes of a lot of routines the Studio open dialog query is very handy and you can sort by the routine size too. There is also a routine specific query in %Routine class to, but if you need to see classes, or CSP pages etc then the open dialog query is the best:

 

d ##class(%ResultSet).RunQuery("%RoutineMgr","StudioOpenDialog","*.*",,,,1)