Here's what I do when I screw up the startup script. Perhaps others have a more sophisticated way...
Open Filemaker Pro, not your solution.
Turn on Script Debugger (under Tools).
Open the solution.
Press the red X in Script Debugger to stop the script.
Make that FileMaker Pro Advanced. No script debugging in the regular version. Another option is, on a Mac, press Command-. as soon as the DB opens.