tips
[Top] [All Lists]

REALbasic Tip: Conditional break points in the debugger

To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Subject: REALbasic Tip: Conditional break points in the debugger
From: Geoff Perlman <geoff at realsoftware dot com>
Date: Fri, 16 Nov 2001 16:58:40 -0600
Conditional break points can be handy when you want to step through your
code in the debugger but only after a specific condition is met. REALbasic
doesn't currently support conditional break points but Mike Bailey (an
enthusiastic REALbasic user and engineer here at REAL Software) reminded me
that you can get the same effect. Say you want to break in a particular
method when the variable x equals 10. First, at the point in your code where
you want to break, add the following If then condition:

If x = 10 then

End if


Notice the empty line in between If and End If. Place the cursor on the
empty line then choose Set Breakpoint from the Debug menu. When you run your
code, REALbasic will only reach that breakpoint if the condition is met.
--

Geoff Perlman
President & CEO
REAL Software, Inc.
http://www.realsoftware.com
mailto:geoff at realsoftware dot com
Phone: 512-263-1233 x711
Fax:   512-263-1441


 - - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot
For list commands, send "Help" in the body of a message to
<requests at lists dot realsoftware dot com>



Return-Path: <realbasic-tips at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with SMTP (Eudora Internet Mail Server 3.1.3);

Received: from realsoftware.com by lists.realsoftware.com with SMTP; Mon,
21 Oct 2002 14:02:23 -0500
User-Agent: Microsoft-Entourage/10.1.1.2418

Subject: REALbasic Tip: Addendum to short name on Mac OS X
From: Geoff Perlman <geoff at realsoftware dot com>
Message-ID: <B9D9B11E dot 18E83%geoff at realsoftware dot com>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Reply-To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Sender: <realbasic-tips at lists dot realsoftware dot com>
Precedence: Bulk
List-Software: LetterRip Pro 3.0.7 by Fog City Software, Inc.
List-Subscribe: <mailto:realbasic-tips-on at lists dot realsoftware dot com>
List-Unsubscribe: <mailto:realbasic-tips-off at lists dot realsoftware dot com>
Status: RO

Apparently, Christian has found an every shorter way to get the short name
on Mac OS X (no pun intended):

name = DesktopFolder.parent.name
--
Geoff Perlman
President and CEO
REAL Software, Inc.
512-328-7325 x711 (voice)
512-328-7372 (fax)


- - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot To unsubscribe from the Tips list, send an email to <mailto:realbasic-tips-off at lists dot realsoftware dot com>


Return-Path: <realbasic-tips at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with SMTP (Eudora Internet Mail Server 3.1.3);

Received: from realsoftware.com by lists.realsoftware.com with SMTP; Mon,
21 Oct 2002 17:30:26 -0500
User-Agent: Microsoft-Entourage/10.1.1.2418

Subject: REALbasic Tip: Short name on Mac OS X Addendum II
From: Geoff Perlman <geoff at realsoftware dot com>
Message-ID: <B9D9EA22 dot 18EC7%geoff at realsoftware dot com>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Reply-To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Sender: <realbasic-tips at lists dot realsoftware dot com>
Precedence: Bulk
List-Software: LetterRip Pro 3.0.7 by Fog City Software, Inc.
List-Subscribe: <mailto:realbasic-tips-on at lists dot realsoftware dot com>
List-Unsubscribe: <mailto:realbasic-tips-off at lists dot realsoftware dot com>
Status: RO

Steve Hedig pointed out that while the method suggested will work most of
the time, it's not bullet-proof. A bullet-proof way to get the short name on
Mac OS X is to issue the "Who Am I?" command to the UNIX shell and get the
result. The following code will do just that:

dim s As Shell
dim shortname as String

s = new Shell
s.execute "whoami"

shortname = s.result
--
Geoff Perlman
President and CEO
REAL Software, Inc.
512-328-7325 x711 (voice)
512-328-7372 (fax)


- - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot To unsubscribe from the Tips list, send an email to <mailto:realbasic-tips-off at lists dot realsoftware dot com>

<Prev in Thread] Current Thread [Next in Thread>
  • REALbasic Tip: Conditional break points in the debugger, Geoff Perlman <=