Debug line number references not accurate when using Libraries

I thought I would try out creating a library and so far it works well with one VERY BIG exception.

Now, when I get a code error in the logs it may reference a line number that does not exist. It will also state the error lies within a specific function, where in fact the error actually resides in a called library function.

Any wisdom for this other than writing 100% error free code or copying everything out of the library back into the code module?

I should add that I have learned about the "Download" option to get a complete file listing. Useful but a bit cumbersome.

That's what you'll have to do, and that's what the error is referencing. The "included" library is a very simple text substition of the library contents (plus line number comments, which may help you find the offending code if it's in the library and not the "main" file). There's no other magic going on behind the scenes.

As an alternative while you're debugging, if you're doing this a lot: maybe just use the complete app or driver code file rather than libraries?

4 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.