it's because the $DEBUG flag doesn't exist in RGSS2, it has been replaced with $TEST.
So in Main, at the very begining of the script, add $DEBUG = $TEST.
If it doesn't work, then add $DEBUG = $TEST = true instead. Note that in the final version of the game you'll have to set these variables to false, add $DEBUG = $TEST = false, or else, the player will always be in debug mode.