1) you miss a final condition in $SELECT(). It's the 1:
$SELECT(^GlFSL("Debug")>0:Entry^HS.Local.VA.Util.Log(%arr,,"D"),1:QUIT)
2) QUIT doesn't return a value but <UNDEFINED> error if you don't have 
a SET QUIT=""  somwhere before or use $GET()
this may fit

$SELECT(^GlFSL("Debug")>0:Entry^HS.Local.VA.Util.Log(%arr,,"D"),1:$GET(QUIT))

Command QUIT is just appropriate with $CASE(...)
https://docs.intersystems.com/iris20252/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fselect#RCOS_fselect_select_and_case

TestFor.inc
 

#define MyLoop(%count) set x="" for i=1:1:%count set x=$order(^%SYS("JOURNAL",x),-1) write x,! 

in Test class:
 

ClassMethod Mike()
{
	$$$MyLoop(7) Write ?5,$get(@$ZR," *** "),!
}	

Resulting in

PURGED
      ***
PREFIX
 
MAXSIZE
     1073741824
LIFESPAN
      ***
LAST
     1^C:\InterSystems\IRIS242\mgr\journal\20251029.003
EXPSIZE
     0
CURRENT
     1^C:\InterSystems\IRIS242\mgr\journal\20251029.003

(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
}