[R] Line numbers in error messages

Webb Sprague wwsprague at ucdavis.edu
Tue Apr 13 00:20:58 CEST 2004


Hi Patrick,

>It's very simple using a browser() line in your function somewhere you
>know your code's OK, then run line by line.  
>
The problem is that sometimes you have code of a few hundred lines, to 
which you have added a strange little line that craps out because of 
some silly mistake that would be apparent if you knew which line to look 
at.  However....  you don't want to start inserting browser statements 
inside the code, hoping to get close, you just want to know what line 
caused the issue.

I already use ESS.  If it would give line numbers, my life would be perfect!

Is there something about debugging in S/R that I am missing?  I don't 
want to have to run a debugger except when there is a real problem, not 
just some silliness.

W




More information about the R-help mailing list