Hi,
With pause..
You have to set pause on
And then type pause in the do file where you want to pause. When you want it
to resume you have to press q. Is there a way to run a do file command by
command (without manually typing pause), pausing after each one and resuming
when prompted by the user by a key stroke?
I know it can be done in other programs, for example, one that I know is
excel VBA where I can run VBA macro line by line by pressing f8.
rajesh
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Richard Goldstein
Sent: 29 March 2008 14:39
To: [email protected]
Subject: Re: st: Stepping through do file
see help, or manual, for -pause-
Rich
Buzz Burhans wrote:
> Is there a way to step through a do file other than highlighting a line in
> the do file editor and running the selected lines?
>
> I need to debug a set of do files. I need to find places where my code is
> changing the data improperly - the files run ok, so -set trace on- does
not
> help the error trapping in this case.
>
> I run repeated selections by highlighting them in the do file editor. If
> previous lines created a -tempfile- or local macro, it no longer exists
when
> I run later set of lines. For instance, if I select lines 1-10 and run
them,
> and a -tempfile- is created in those lines, when I later try to run lines
> further in the do file that use the -tempfile-, the -tempfile- no longer
> exists.
>
> It would be really nice to step through a do file and keep it active
during
> the process, so local macros and tempfiles continued to be available in
the
> later lines.
>
> I am using Intercooled Stata 9.2; moving to 10 but haven't loaded it yet.
> Running on Win XP.
>
> Buzz Burhans, Ph.D.
>
> Dairy-Tech Group
>
> Twin Falls, ID
> Phone: 208-320-0829
> Fax: 208-735-1289
>
> So. Albany VT
> Phone: 802-755-6842
>
> Email: [email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/