Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging issues

Status
Not open for further replies.

phil22046

Programmer
Sep 12, 2001
154
US
1) When debugging my code I sometimes browse a file to check the contents. Then sometimes I am unable to close the browse window, because the Red X in the upper right corner is disabled, later in my code the statement _screen.activeform.release will not work because the browse window has the focus. Is there any statement I can type in the command window to close the browse window? (other than closing the file I was browsing)

2) Sometimes I want to change what statement should execute next when debugging, however the option is disabled sometimes in the debugging menu. What controls this?
 
"I sometimes browse a file to check the contents"

When you do that how do you launch the Browse window?

Do you issue a
Code:
  SELECT ThisDBF
  BROWSE [B]NORMAL[/B]

If you don't issue the NORMAL option with the Browse command, the table typically opens into the currently defined Form 'window'.
If it does so it then may inherit the properties of the Form
(such as ThisForm.Closeable = .F.)

"Is there any statement I can type in the command window to close the browse window?"

If you open the BROWSE as NORMAL, you should be able to close it with either the upper right X or the upper left CLOSE

"Sometimes I want to change what statement should execute next when debugging"

If I understand what you are saying (and I may not!!!)
If you are debugging in the TRACE window, you don't get to pick which lines of code execute. The code lines will execute sequentially (unless you insert additonal code which can conditionally control execution).

The TRACE window command buttons will allow you to
RESUME
CANCEL
EXECUTE ONE LINE
EXECUTE OVER A SUB-ROUTINE/FUNCTION
EXECUTE UNTIL EXIT OF CURRENT SUB-ROUTINE
RUN TO CURSOR

If after breaking into the Debug mode, you want to test another alternate line of code, you can always manually enter it in the COMMAND WINDOW to see what it will do.

Good Luck,
JRB-Bldr
 
JRB-Bldr,

Are you confusing Fox 2.x? I think phil22046 is talking about 'Set next statement'.

Anyway, whenever I see this, is it usually when within a control structure such as FOR...NEXT, or (for lack of a better term) within an object structure such as WITH...ENDWITH.

You have to first choose the 'Set next statement' at the last line prior to the ENDWITH, then step out of the structure.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks Dave & jrbbldr, the Browse normal is exactly what I needed and now I understand that the set next statement is disabled in for..next and with..endwith structures. almost 1/2 my code consists of these constructs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top