Archives

HTML/javascript

You know what HTML, javascript, and related web development tools need?

They need an equivalent of the C preprocessor's #line directive. Many of you are probably not familiar with #line (even those of you who are C programmers), because it's not user-visible. When the C preprocessor combines your .c file and all of your .h files via #include, it inserts numerous #line files so that the compiler proper can print out meaningful error messages with correct line numbers.

Share

2 comments to HTML/javascript

  • … somehow I’ve been falling into the world of PHP and SQL and LDAP and bash scripting at work …

    I feel a bit more like a Unix sysadmin than a firmware guy sometimes, but it’s a nice break.

    (And you’re right about many languages not spitting out line numbers on errors, it is annoying.)

    • pmb

      The bigger problem is when you are debugging, say, Javascript emitted by a .cgi script. You need to chase javascript errors backwards through to the proper line of the emitter. #line would be totally nice there.

Leave a Reply