As is almost always the case with such questions; it depends!
The main difference is that an application to which a debugger is attached
it typically compiled with debug options. Importantly this suppress the
normal optimisations a compiler would otherwise make when compiling for
release.
If the application spends most of its time in libraries then very little
difference will be seen. OTH if the application spends most of its time in
its own code that would normally be optimised it could make quite a
significant difference. There is no easy way to tell.
All compilation optimization is off, so there is a little more code to
run for most operations. That will slow it down a few percent.
Throwing exceptions in debug mode costs a lot more than in release mode.
If you do this a lot (which of course is not recommended for normal
program flow), the code will get very slow.
The garbage collector changes how it determines when objects are unused
in debug mode. All variables are considered to be used throughout
their scope, so objects live longer causing a bigger memory footprint
for the application.