Skip to content
Prev 312632 / 398506 Next

Line numbers with errors and warnings?

Le dimanche 02 d?cembre 2012 ? 06:02 -0500, Steve Lianoglou a ?crit :
Indeed, I often suffer from the same problem when debugging R code too.
This is a real issue for me.
What are the cases where you cannot get line numbers? Duncan said
source()ed code comes with line numbers, but what's the more general
rule?
This is very useful of course to find the problematic function, but
quite often I end up wondering what exact command triggered an error.
For example, "subscript out of bounds" is hard to match to a precise `['
use in a whole function.

Even when using browser(), sometimes you cannot know where you are in
the function. So the line number, or the contents of the last line,
would be relevant information.
Of course experience helps, but without the most relevant information
(line number) you productivity is always affected... ;-)


Regards