Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jun 20, 2018 6:15 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: System.DebugLog
PostPosted: Sat Oct 01, 2005 4:39 am 
Offline

Joined: Fri Sep 30, 2005 8:47 am
Posts: 100
Is there anyway to have System.DebugLog not pump any messages when an application is being built for release ?? Which leads me onto another can we differentiate from RB where we are in debugging mode or release mode ?? Which leads onto, how can we build debugging builds of an application for testing under various environments (to which we dont necessarily run with REALbasic but can connect to it when required ?)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 01, 2005 7:53 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 8:05 am
Posts: 61
Location: Edinburgh, Scotland
Generally, you can use:

If DebugBuild Then
System.DebugLog "We're here"
End If


Although, in my apps I like being able to do debugging on the real thing - so I create my own global variable (say called App.DebugMode) that can be turned on with a hidden preference. So in App.Open I have:

If DebugBuild or (myPrefs.Value("Debug") = True) Then
DebugMode = True
Else
DebugMode = False
End If

_________________
Charlie Boisseau
[ My Site | My Blog | Net Tool Box ]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 01, 2005 11:11 am 
Offline

Joined: Fri Sep 30, 2005 12:18 pm
Posts: 629
I prefer to use the Preprocessor to save a few cycles:

#If DebugBuild Then
System.DebugLog "Some message."
#Endif


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 01, 2005 11:12 am 
Offline

Joined: Fri Sep 30, 2005 2:17 pm
Posts: 171
Phil M wrote:
I prefer to use the Preprocessor to save a few cycles:

#If DebugBuild Then
System.DebugLog "Some message."
#Endif


I'd agree, but Charlie's allows for a hidden preference key to unlock debugging. All a matter of what you want.

-- SirG3


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group