[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Stepping through do file

From   "Rajesh Tharyan" <[email protected]>
To   <[email protected]>
Subject   RE: st: Stepping through do file
Date   Sat, 29 Mar 2008 15:04:49 -0000

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.


-----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-


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
> 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
> I run later set of lines. For instance, if I select lines 1-10 and run
> 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
> the process, so local macros and tempfiles continued to be available in
> 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:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index