Re: VFP 9: Debugging: Checking Multiline Values by Bernhard
Bernhard
Thu Nov 02 05:02:14 CST 2006
Hi Gene,
>>I have a special development pad in my menues, it is available only in the ide.
>>In the development popup is a bar to open the command window in dockable state.
>>In this state it is opened in the windows desktop, independent from _SCREEN.
>>
>>During debugging, while the program is suspended, I open the command window and
>>type:
>>_cliptext = the_same_expression_as_in_watch_window<enter>
>>It is possible to copy this expression right from the watch window.
>>Then I open some editor, mostly notepad. There I paste the clipboard and can
>>read all the lines.
>
>
> That sounds interesting. Could you please post the code (or more
> details at the least)?
I have a special startup prog. With it I start the program in the IDE. There I
define a global variable _devmode and set it to .T.
In the main program I redefine the variable if it does not exist. In that case,
I leave it at .F.
In the main program there is a line CLEAR ALL. It would destroy the _devmode
variable. Work around: CLEAR ALL does not clear the system variable _pdparms.
This I use as intemediate store for _devmode:
*--
PUBLIC _pdparms(1)
_pdparms(1) = iif(type("_devmode") = "U" , .F., .T.)
CLEAR ALL
PUBLIC _devmode
_devmode = _pdparms(1)
*--
In the definition of the menu(s) (I only have hand coded menus), if _devmode is
true, I extend the menu with whatever I need in developement mode.
One pad simply calls SUSPEND
Another pad calls RESUME
Another pad opens the command window
With another pad I can activate the (normally not visible) screen, so that I can
read the output from commands of the command window and it does not overwrite
some form.
Another pad calls the cleanup routine of my program
This is very useful, if I cancel program execution from the debugger. At this
point, all the forms and menus continue to live as they where active before the
cancel. With this pad I savely return to the IDE.
To activate the command window in dockable state I use a little program:
*--
WDOCKABLE("command", .T.)
ACTIVATE WINDOW command
*--
To activate the screen:
*--
_screen.Visible = .T.
ACTIVATE SCREEN
*--
Regards
Bernhard Sander