Subscribe to our mailing list

* indicates required
Close

Wednesday, June 23, 2010

Chrome annoyances: Console does not support multiline code entry

I'm dismayed (and shocked) to learn that the Chrome Javascript console still doesn't support the manual entry of multiple lines of code; instead, you have to copy and paste multiline-code into the console to work around the problem, which frankly sucks pretty badly.

If I want to type 3 lines of code into the console, like so:

> function subtract( a,b ) {
return a - b;
}

. . . I simply cannot. The instant I hit Enter after typing "function subtract( a,b ) {", that line executes -- with a Syntax Error (unexpected end of input). I can't type the whole function, on multiple lines, then execute it.

In Adobe Acrobat Pro (which has a Javascript console -- enter Control-J to see it), Adobe solved this problem by letting Enter take you to the next line (as you'd expect) and letting Control-Enter execute all lines of code. Firebug's console has the same behavior.

I would like to see Chrome implement the same behavior as it exists in the Firebug and Acrobat consoles. The Enter key should let you type on multiple lines. Control-Enter should execute code.

Alas, Chrome doesn't work that way. The one-line-at-a-time behavior has been in Chrome since the beginning (and is still there in 5.0.375.70 beta). Issue 35487 was raised in February, addressing the problem. Let's hope it gets fixed soon. As a developer, I find it to be a blocker: i.e., it's a top-priority bug, not just an annoyance. Immediate attention required.

1 comment:

  1. hi
    this comment has nothing to do with your post, but i wanted to contact you and ask you a question. i had a horrible unknown error in itunes and your fix (from last september)was the only one that actually worked.
    i was not upset about the music i was upset about the fact that my entire calendar for my whole family is on my ipod and it was useless for two days.
    i tried a long time ago to synch my ipod with my google calendar and it worked for about a minute and then never worked again.
    i can get the google info to jump onto my ipod but the stuff on my ipod will not go on to the google even though the instructions told me it would.
    i was wondering if you knew anything about synching these two things because if i actually do loose this calendar i would have a fit.
    thanks for your time
    and your help with the itunes problem saved the day
    amy

    ReplyDelete

Add a comment.

Note: Only a member of this blog may post a comment.