Add Browser object to the project. Add this event:
Browser Log "Left " & ViewportLeft("HUD") & " Right " & ViewportRight("HUD") & ... and so on, as many values and variables as you need.
Run the game, press F12, open Console tab and check the output.
You might also want to run your project in Debug Mode, so you could pause at any time, check variables, objects etc.
Browser-Log and Debug Mode are two main troubleshooting methods.