(picture)

October 09, 2003

JavaScript misc: #include and debugger

A couple of pieces of JavaScript trivia.

The debugger; statement doesn't seem to be very widely known. It brings you into the script debugger. (For scripts in IE, you'll need to enable script debugging, by unchecking Tools - Internet Options - Advanced - "disable script debugging"). As to which debugger you get, well, I haven't worked that out yet; I get to choose from a list of the half-dozen installed script debuggers. Strange that Microsoft should produce so many, really.

Eric Lippert explains why the language itself doesn't have #Include. Now here's a trick for web pages to include an arbitrary script at runtime. (Same with commentary, here).