Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Tracing in Stata


From   John Bates <[email protected]>
To   Stata <[email protected]>
Subject   st: Tracing in Stata
Date   Tue, 5 May 2009 09:41:15 -0700 (PDT)

<>

Hi,

Is there any way to figure what line in a for loop Stata is erroring on?  The best way I know of is to do -set tracedepth 1- and -set trace on-.  This works, BUT it's annoying because Stata traces down into function calls that I don't care about.  For example, assume there is an error somewhere in the following (potentially very long) for loop:

forval x = 1/20 {
          regress...
          probit....
       ...
}

I just want to know which line in the for loop the error is without having trace go down into the regress ADO code etc.  This is not a problem outside of the for loop because Stata goes line-by-line down do files by default.  All in all, a very minor issue, but one that frustrates me.  Ideally there would be a -set tracedepth 0- option which would address this.

Lirac



      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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