(error on compiling within a class) like: 
#define TestIf(%arr)        if (%arr > 0) { QUIT 5 }    ; no final dot.

#define is an element of ObjectScript
so it has to be embedded in a [Class]Method 
and it is only available within that method

It can't be flying free inside a class definition.

If you need your $$$TestIf(...)  in more than 1 method, you can deposit
it in some TestIf.INC  and include it BEFORE the Class statement !!
Then it is visible to ALL methods.

Attention: You can INCLUDE just 1 single  *.INC in a class definition.
If you need more than 1, you have to cascade it with #include  in  the first *.inc

Include TestIf

Class A.PERSON1 Extends %Library.Persistent
{
Parameter GlobalName = "^.........!"  ;;
/// .......
ClassMethod michael(param) as %Integer
{
    $$$TestIf(param)
 .........
    quit $$$OK
}

 
   

If you just see pre you may have a problem with your  &html< ........>  sequence
that translates to write ........,! including all quoting requirements,

while <pre> any text </pre>  is just straight HTML

and  #(variable)# is a CSP instruction to display the actual content of a variable
and avoid any extra spaces

To me, the most impressive fact about InterSystems is that it doesn't
hide or deny its roots or reject its history, and keep its backward compatibility.

I remember a customer who had composed and used an incredible complicated
program to create knitwear patterns with his equipment for over 30 years without change.
When he migrated to IRIS it was running perfectly without changing a single bit.

This still impresses me more than all the new language features
that force me to adjust versions as an ongoing challenge.

3 variants come to my mind

  1. writing to ErrorLog  Do LOG^%ETN()
  2.  write to Systrem message.log
     set %evgeny=$io
     open 1 use 1 write !,"Was in my REST code",! close 1
     use %evgeny
  3. If you have a terminal session  LOCK  ^%EVGENY --- And into your code, add this simple loop 
  4.  for  LOCK +^%EVGENY QUIT:$TEST   HANG 0.5
    Now your method loops, and you can attach with any external debugger. Releasing the LOCK from Terminal does the "un-freeze"

I've been offering my reports on reviews for more than four years now,
as a personal service to the DC community, to show recent reviews.
And this covers any new review I can detect, not just add-ons to my own 700+ positive reviews
I started it long before the quality reports you mention were even proposed and implemented.

And even at my advanced age, I'm not willing to leave my audience in the lurch
until I'm explicitly forced by DC+OEX managers with a reasonable explanation.

In addition, the quality reports you address have neither a selectable overview
nor any kind of summary or view of progress.