It is not a debug message box but thinBasic think first parameter is the handle of the parent window and try to transform message text into a number.
Anyway, next thinBasic version will have parent window handle as optional. New syntax will be:
Result = MSGBOX([hParent,] Message [, Style [, Title [, Timeout [, UpdateCountDown, [, CountDownFormat ] ]] ] ] )
'---No parent window
Msgbox 0, "Test"
'---hwndParent is the handle of the parent window
Msgbox hwndParent, "Test"
Will be the parsed correctly.
'---No parent window, just message box