Page 1 of 1
If in_IDE
Posted: Mon Apr 28, 2025 9:45 am
by rndrei
How to find out the program in IDE or not?
I thought it would be, something like that!?
Code: Select all
CompilerIf Not #PB_Compiler_Debugger
CompilerEndIf
Re: If in_IDE
Posted: Mon Apr 28, 2025 10:09 am
by NicTheQuick
I think you can use #PB_Editor_CreateExecutable for that. You can read more about it here:
https://www.purebasic.com/documentation ... piler.html
Re: If in_IDE
Posted: Mon Apr 28, 2025 10:41 am
by infratec
You have to check the compiler option editor constant, then you can use:
Code: Select all
CompilerIf Not #PB_Editor_CreateExecutable
MessageRequester("Info", "Started from IDE")
CompilerEndIf
#PB_Compiler_Debugger works too if you always have the debugger enabled in the IDE (which is normally the case)
In the 'real' executable the debugger is never enabled.
Re: If in_IDE
Posted: Mon Apr 28, 2025 4:35 pm
by Piero
Isn't this worth a feature request?
Like:
Code: Select all
CompilerIf #PB_Running_TemporaryExecutable
MessageRequester("Info", "Started from IDE")
CompilerEndIf
Re: If in_IDE
Posted: Tue Apr 29, 2025 3:59 pm
by Axolotl
have you tried this
Code: Select all
Macro IsAppRunningInsideIDE()
Bool(GetEnvironmentVariable("PUREBASIC_HOME") <> "")
EndMacro