<p>How can I print a message to the error console, preferably including a variable? </p>

<p>For example, something like:</p>

<pre><code>print('x=%d', x);
</code></pre>

Install
Firebug
and then you can use
```
console.log(...)
```
and
```
console.debug(...)
```
, etc. (see
the documentation
for more).