---
title: How to run arbitrary multi-line Javascript in Firefox's Firebug Debugger
description: I use the console in Firebug all the time to test out one-liners in Javascript (like regexes for instance), but I had no idea that you could type multiple lines of JS in Firebug and run it. As I should have known of course they implemented this. Here's how:
image: https://blog.thoughtlabs.com/hubfs/Imported_Blog_Media/javascript_console.jpg
---

<https://www.thoughtlabs.com/>

- [About Us](https://www.thoughtlabs.com/about.html)
- [Our Services](https://www.thoughtlabs.com/services.html)
- [Our Clients](https://www.thoughtlabs.com/clients.html)
- [Our Blog](https://blog.thoughtlabs.com/blog/)
- [Our Book](https://www.thoughtlabs.com/book.html)
- [Free Resources](https://www.thoughtlabs.com/free-resources.html)
- [Speaking](https://www.thoughtlabs.com/speaking.html)
- [Contact Us](https://www.thoughtlabs.com/contact.html)

<https://twitter.com/thoughtlabs> <https://www.facebook.com/thoughtlabs>

![](https://blog.thoughtlabs.com/hubfs/Imported_Blog_Media/javascript_console.jpg)

# How to run arbitrary multi-line Javascript in Firefox's Firebug Debugger

![Cappy Popp](https://blog.thoughtlabs.com/hs-fs/hubfs/author-cappy-popp.jpg?width=50&height=50&name=author-cappy-popp.jpg)

Written by [Cappy Popp](https://blog.thoughtlabs.com/blog/author/cappy-popp)

on Sep 27, 2007

![javascript_console](https://blog.thoughtlabs.com/hs-fs/hubfs/Imported_Blog_Media/javascript_console.jpg?width=517&name=javascript_console.jpg)

I use the console in Firebug all the time to test out one-liners in Javascript (like regexes for instance), but I had no idea that you could type multiple lines of JS in Firebug and run it. As I should have known of course they implemented this. Here's how:

You can either just paste a block of code into the console edit field (that's the line at the bottom of the console window that starts with '>>>' and has a flashing cursor), or click the little red icon at the lower right side of the console window.

Either way, it brings up the Firebug JavaScript editor window. Just click the 'Run' button at the bottom, tweak as necessary, and copy into your final desitination!

 Topics: [Programming](https://blog.thoughtlabs.com/blog/tag/programming)

**About the author:**

![Cappy Popp](https://blog.thoughtlabs.com/hubfs/author-cappy-popp.jpg)

#### [Cappy Popp](https://blog.thoughtlabs.com/blog/author/cappy-popp)

Cappy Popp has decades of software development experience and has successfully designed and implemented digital strategies for dozens of companies in multiple markets. Cappy specializes in digital strategy, analytics, and monitoring and is the co-author of the acclaimed book, Essential Facebook Development.

Find me on: <https://facebook.com/cappypopp> <https://linkedin.com/in/cappy> <https://twitter.com/cappypopp>

 Copyright © 2026 Thought Labs, LLC. All rights reserved. Website Design & Development by [Metropolis](https://www.metropoliscreative.com)  |  [privacy policy](https://www.thoughtlabs.com/privacy.html)  |  [cookie policy](https://www.thoughtlabs.com/cookie-policy.html)  | 

cookie settings

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Cappy Popp",
    "url" : "https://blog.thoughtlabs.com/blog/author/cappy-popp"
  },
  "dateModified" : "2024-03-20T18:59:53.040Z",
  "datePublished" : "2007-09-27T04:00:00.000Z",
  "headline" : "How to run arbitrary multi-line Javascript in Firefox's Firebug Debugger",
  "image" : [ "https://blog.thoughtlabs.com/hubfs/Imported_Blog_Media/javascript_console.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.thoughtlabs.com/blog/how-to-run-arbitrary-multi-line-javascript-in-firefoxs-firebug-debugger",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.thoughtlabs.com/hubfs/Email/TL%20Logo%20Wide.png"
    }
  }
}
```