@Thaddy: I do not think his problems happened while he tried to debug. But rather because "F9/Run" starts the project in the debugger, even if you do not want to debug.
So debug info is not his problem.
Debug info would also (except for initial load time / load time of dll) not affect the speed at which the app runs.
@JernejL:
One point to consider after Thaddy's post. When you run without debugger, you just used the "run without debugger" from the run menu, or you started the app outside the IDE?
You did not change any other Options? You did not change build-mode, assertions, run time checks (overflow/range/...), optimization, ...?
In case of interest, here is what Windows reports to the debugger
https://docs.microsoft.com/en-gb/windows/win32/api/minwinbase/ns-minwinbase-debug_eventEach time one of those events happens, your app is paused for a very short time.
The event log may be filtered, and not show all of them (see options).
Using GDB, you can look at menu View > Ide internals > debug output
(depending on Lazarus version, this may be View > Debug windows > debug output)
And you will see whatever gdb reports. Yet gdb may get events that it does not report.
Anyway that would not resolve the Issue.