[Implemented] CompilerIf #PB_Debug

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

[Implemented] CompilerIf #PB_Debug

Post by Rescator »

CompilerIf #PB_Debug

Could this compiler directive be supported?
So that alternate code could be used in those cases
where debug mode or IDE runned causes path etc. issues?

Particulary in cases where GetModuleFileName_() etc. is used and thus returns different results compared to the "finished" compiled program.
Last edited by Rescator on Thu Sep 29, 2011 12:56 pm, edited 1 time in total.
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Yes that would be very good. And maybe something like "CompilerIf #PB_Executable" for if it is created through the menupoint "Create Executable...", because I don't debug everytime my program ;) . Sometimes the debugger is off.
bye,
Daniel
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Re: CompilerIf #PB_Debug

Post by Kale »

Rescator wrote:CompilerIf #PB_Debug

Could this compiler directive be supported?
So that alternate code could be used in those cases
where debug mode or IDE runned causes path etc. issues?

Particulary in cases where GetModuleFileName_() etc. is used and thus returns different results compared to the "finished" compiled program.
Maybe clearer to have:

Code: Select all

CompilerIf #PB_Debugger_Enabled
...
--Kale

Image
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

perhaps in v4, dunno, but until then some workaround's: japbe, codecaddy, purebuilder
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply