I think the IDE should have a line number option under Tools or View. Also, this option should be available in the Serial Monitor, too.
For some reason in the IDE, I can't Cut/Copy and Paste to gedit. The OS is Ubuntu 10.04. However, I can do so in Open Office Word. I can go the other way, that is Paste into the IDE from gedit. Selecting Use External Editor doesn't help. Very strange.
How do I use Copy for Forum?
I think the IDE should have a line number option under Tools or View.
It does, look at the bottom left hand corner of the IDE window, that number is the line number.
Wise guy... Line numbers on every line, like any normal programming editor. It makes finding errors listed by line number much faster. I don't know why this hasn't been incorporated yet. It's been asked for for a lone time.
I don't know why this hasn't been incorporated yet. It's been asked for for a lone time.
I suspect the Arduino community would greatly appreciate your adding this feature. I'll get you started...
Download the latest source code...
Prepare a development environment...
Add the feature.
And create a pull request...
Hehe, it would be best you don't temp me. That kind of coding is best left to people who have an idea of what they're doing when it comes to non-embedded programming.
I did forget that the Arduino guys don't like to make major changes to the editor, and leave that mostly to the Processing crowd.
Line numbers on every line, like any normal programming editor.
I haven't used a programming editor that shows line numbers since SPF on IBM mainframes in the early 1980s.
And SOS on DEC mainframes in the same timeframe, but that wasn't a "display" editor. :-)
It's not an off-the-wall request. If the compiler errors out and says "filename @ line number so and so has an error", it's not silly to expect to see a line number somewhere in the editor. For an environment that caters to the uninitiated... this should not be a ridiculous idea to the dev's.
If the compiler errors out and says "filename @ line number so and so has an error", it's not silly to expect to see a line number somewhere in the editor.
True. But there already is a line number "somewhere in the editor" (lower left corner), AND the IDE already attempts to reposition/highlight to the line with the error...
It would be nice if the line numbers were more accurate. Thanks to the pre-processing done by the IDE, the line numbers in the compiler error messages don't always match the actual line numbers (it attempts to correct, but doesn't always succeed.)
It would also be nice if C compilers had parsers that were more capable of recovering from errors so that they could could on to (reliably) detect more errors in the same file. But this seems to be genuinely difficult :-(
You can use an external editor with linenumbers, I often use notepad++ (but not primary for the linenumbers). Check IDE-> File menu -> preferences
Errormessages 99% refer to lines just edited that's the part probably open in the editor anyway, so linenumbers are not so informative. Furthermore the linenumber in the errormessage is the place where the compiler gave up parsing (syntax level!). too often the real error occurred a few lines before - even in that just included new.h file :(