Page 1 of 1
Questions about compiling for distribution
Posted: Wed Jan 23, 2019 12:28 am
by RobertSF
Usually, you compile with debug information while developing, and then compile without debug information for the final release. How does this work in PureBasic?
In Compiler Options, under Compile/Run, there's a checkbox for Enable Debugger. But I've created executables with that checkbox both checked and unchecked, and the executables are the same size, so I'm thinking that has no effect.
Re: Questions about compiling for distribution
Posted: Wed Jan 23, 2019 12:46 am
by skywalk
I agree it could be more explicit, but, Compile/Run <> Create Executable.
Compile/Run with debugger enabled is definitely a larger exe.
Create Executable drops or ignores debugger settings.
Re: Questions about compiling for distribution
Posted: Wed Jan 23, 2019 1:02 am
by Dude
Yep. Creating an executable doesn't include any debug info, so that the exe has both the smallest file size and fastest runtime speed.
Re: Questions about compiling for distribution
Posted: Wed Jan 23, 2019 3:04 am
by RobertSF
Thanks for the reassurance, everyone!

Re: Questions about compiling for distribution
Posted: Wed Jan 23, 2019 3:20 am
by chi
RobertSF wrote:How does this work in PureBasic?
Actually "Compile/Run", "Compile with Debugger" and "Compile without Debugger" creates the .exe/.dll in your local temp directory (%USERPROFILE%\AppData\Local\Temp) or, if checked "Create temporary executable in the source directory", in your source directory.
"Create Executable..." on the other hand, creates the executable always without the Debugger (in the directory you specified), whether the Debugger is enabled or not.
FYI: If you run the executable built with the Debugger enabled from outside the IDE, you'll see the Debug output in a console window...
Re: Questions about compiling for distribution
Posted: Thu Jan 24, 2019 3:48 am
by RobertSF
Thanks for the clarification! I didn't want to ask again

but I had wondered where the executable went. I thought it might just compile in memory and then run, but now I know it's in the temp directory.