![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am adding a call to a form. For that, I have to open a table. If I run the program, I get an error that it is already open. Fine. Where? I add a set step on (conditionally on a messagebox). I set a breakpoint for when used("cftiwiz_ccli") becomes true. I run the program again. I answer yes to wanting step on. I continue the code as needed. The only time the breakpoint is set off is in the new routine! I run the program yet again. I answer no to wanting step on. The code blows up as it did before the debugging code was added. I just want to find out where in the execution path the table is being opened. Am I doing something wrong, or is this a debugger bug? |
#3
| |||
| |||
|
|
2) When I want to find where some mysterious thing is happening in my code, I do the following (similar to what you're doing I think): a) Determine a point in execution that is definitely before the mystery happens but is only executed once (like in a button click - not in a refresh or activate event method). b) At that point, place a SET STEP ON c) When the debugger appears, enter a "Break when condition is true" breakpoint where the condition is the mystery event: USED("my_table") = .T. d) Resume execution of the program and wait for it to break on the mystery event. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
any activeX or event-dependant code in your app ? The debugger works a liitle bit different in these areas... |
|
good hunting |
#6
| |||
| |||
|
|
trw7at (AT) ixdot (DOT) netcomdotcom (Tim Witort) wrote: [snip] 2) When I want to find where some mysterious thing is happening in my code, I do the following (similar to what you're doing I think): a) Determine a point in execution that is definitely before the mystery happens but is only executed once (like in a button click - not in a refresh or activate event method). b) At that point, place a SET STEP ON c) When the debugger appears, enter a "Break when condition is true" breakpoint where the condition is the mystery event: USED("my_table") = .T. d) Resume execution of the program and wait for it to break on the mystery event. The only difference is that I have a messagebox asking whether to set step on. Why is having the debugger running with the breakpoint active making the program not fail on the use? |
#7
| |||
| |||
|
|
Have you added something like this (without any breakpoints in place) right before the problematic USE statement?: WAIT "USED: "+TRANSFORM(USED("my_table")) WINDOW TIMEOUT 3 Does this show "USED: .T." in the wait window? I'm assuming your getting an error 3 "File is un use"? |
#8
| |||
| |||
|
|
Event-dependent: unavoidable. This is a GUI application. (You probably meant something specific that is not coming through. What?) Similar. Running in the debugger is *sometimes* similar to sprinkling |
#9
| |||
| |||
|
|
Event-dependent: unavoidable. This is a GUI application. (You probably meant something specific that is not coming through. What?) Similar. Running in the debugger is *sometimes* similar to sprinkling "doevents" into your code, and, depending on the setting (in/out of Window) it causes different form behavior, causing different events stemming from the form level - which in in step with the things you mentioned down below. |
![]() |
| Thread Tools | |
| Display Modes | |
| |