Open Bug 1113954 Opened 10 years ago Updated 2 years ago

console defines commands that pollute the namespace, can confuse developer during debugging


(DevTools :: Console, defect, P3)

35 Branch
Windows 8.1


(Not tracked)


(Reporter: hsteen, Unassigned)


Per Mike's observation in having 'cd' bound to some built-in console function during debugging is confusing.

Opera Dragonfly solved this by implementing console commands with a comment syntax. Instead of cd() you would type // cd() into the console.

To test this, go to and open dev tools / console tab. Type "cd" (no quotes) and press enter. You should get a warning about cd not being defined.
This bug requires changes in the console, not the debugger, so I'm moving it there.
Component: Developer Tools: Debugger → Developer Tools: Console
Well, about the command-as-comments, I have some concerns. With, we would have the command editor, and pasting functions with comments would be common...

FWIW, Firebug ideas related to that :
- define a "firebug" object with firebug commands in it:
- Commands in Firebug (using a ":" prefix):

Another idea I have just got: what about adding |"force commands";| and |"unforce commands";| statements (*with* the quotes, just like "use strict"), that will enable a prioritized mode for commands over the debuggee environment?
The statement would necessarily be at the top of the evaluated expression (for simplicity of implementation). What do you think?

There is a long-standing plan to combine GCLI and web console, which would result in using a prefix to submit GCLI commands. Perhaps we could move console helpers to that prefix at that time.
Product: Firefox → DevTools
For the record, we moved some of gcli commands into the console, where we use `:` to trigger them (:screenshot, :help).
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.