Console Filter 0.3 [discontinued]

Talk about add-ons and extension development.
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Console Filter 0.3 [discontinued]

Post by old zeniko »

Console Filter has been discontinued. It is recommended to use Console² instead.
---------------------------------------------------------------------------------------------------------
<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter</a> helps you to find the relevant errors in the JavaScript Console.

If you use JavaScript in strict mode (javascript.options.strict is set), it can get pretty difficult to find your own lapses and oversights. Console Filter gives you more control over the console, so that you can focus on debugging instead of digging:

The filter syntax is some kind of "Google Lite": the messages in the console are searched for all terms entered (AND search), but must not contain any terms preceded by a minus sign (NOT search); terms inside quotations marks must be found in that order (exact phrase):
example wrote:error -expect "declaration dropped"

Additionally, there are a few special category filters: @js (JavaScript errors only), @css (CSS errors only), @xml (XML/XUL/XBL/HTML errors only) and @- (messages and strict warnings only). These can be enabled through about:config (recommended for Firefox 1.5).

The filter textbox can be focused (and its content selected) through the hotkeys [Ctrl]+[K] (as the Web Search bar - opposing to [Ctrl]+[L] for the evaluation field) and [Ctrl]+[Q].

The current filter is saved between sessions, as is a list of up to ten permanent filters. To add a filter to that list, confirm it with [Return]. To remove it again, just right-click on it.

Download
<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter 0.3</a>

This release should work for all Mozilla based products with a JavaScript Console and an extension framework: Firefox 1.0 and 1.5, Thunderbird 1.0 and 1.5, Nvu 1.0, Sunbird 0.2+, Netscape 7.2 and 8.0.x, Mozilla Suite 1.7.x and the Gecko 1.9 nightlies (using NTT or MTLI).

Revisions
~~ 0.3 ~~~~
* Bug fix: toolbar customization was broken for Console²/Thunderbird 1.5
* Released on 2005-10-28 (discontinued on 2006-04-26)
~~ 0.2.16+ ~~~~
* Update for <a href="http://forums.mozillazine.org/viewtopic.php?t=318102">Console² v0.2</a>:
- Restoring the default toolbars now doesn't clear them.
- Cursor movements made the console scroll to the selected item
~~ 0.2.15+ ~~~~
* Bug fix: The "All" button was always clicked at startup with categories enabled
~~ 0.2.14+ ~~~~
* Update for <a href="http://forums.mozillazine.org/viewtopic.php?t=318102">Console² v0.1.7</a>:
- CF filters now without flickering
- CF is hidden by default and must be manually added to a toolbar first
~~ 0.2.13+ ~~~~
* Update for <a href="http://forums.mozillazine.org/viewtopic.php?t=318102">Console² v0.1.4</a>:
- CF correctly replaces the search box in the customize dialog
- Added a new category filter: @xml
~~ 0.2.12+ ~~~~
* Compatibility update for <a href="http://forums.mozillazine.org/viewtopic.php?t=318102">Console²</a>
~~ 0.2.11+ ~~~~
* Category filtering can be switched off (extensions.consolefilter.categories, off by default)
* Added <Show All> filter to the drop-down menu
~~ 0.2.10 ~~~~
* Compatibility update for the 1.4+ branch, the 1.6+ trunk and MultiZilla
* Changed the -@ filter to @-
~~ 0.2.9 ~~~~
* Added category filters (@js, @css, -@)
* Added Mozilla Suite/SeaMonkey compatibility
~~ 0.2. ~~~~
* Added a filter history
~~ 0.1.1 ~~~~
* Bug fix: Restored the option to copy error messages (0.1.1)
~~ 0.1 ~~~~
* Initial release 2005-05-11
Last edited by old zeniko on April 26th, 2006, 12:55 pm, edited 15 times in total.
asqueella
Posts: 4019
Joined: November 16th, 2003, 3:05 am
Location: Russia, Moscow

Post by asqueella »

You rule. Thanks.
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

Re: Console Filter 0.1 [Mai 11]

Post by gemal »

zeniko wrote:<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter</a> helps you to find the relevant errors in the JavaScript Console.

If you use JavaScript in strict mode (javascript.options.strict is set), it can get pretty difficult to find one's own lapses and oversights. Console Filter gives you more control over the console, so that you can focus on debugging instead of digging:

The filter syntax is kind of "Google Lite": the messages in the console are searched for all terms entered (AND search), but must not contain any term preceded by a minus sign (NOT search); terms inside quotations marks must be found in that order (exact phrase):
example wrote:error -expect "declaration dropped"

The filter textbox can be focused (and its content selected) through the hotkeys [Ctrl]+[K] (as the Web Search bar - opposing to [Ctrl]+[L] for the evaluation field) and [Ctrl]+[Q].

The current filter is saved between sessions. Suggestions for how to save and display the ten most recently used filters are welcome (just PM me).

Download
<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter 0.1</a>
* Initial release 2005-05-11

This release should work for Firefox 1.0.x, Thunderbird 1.0.x and the 1.0+ nightlies.


This otherwise wonderful extension seems to break the ability to copy JavaScript console entries. My CTRL+C is greyed out when using the extension
Henrik Gemal
Mozilla Evangelist
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Re: Console Filter 0.1 [Mai 11]

Post by old zeniko »

gemal wrote:This otherwise wonderful extension seems to break the ability to copy JavaScript console entries. My CTRL+C is greyed out when using the extension

This has been fixed in <a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">version 0.1.1</a>. Enjoy!
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

Re: Console Filter 0.1 [Mai 11]

Post by gemal »

zeniko wrote:
gemal wrote:This otherwise wonderful extension seems to break the ability to copy JavaScript console entries. My CTRL+C is greyed out when using the extension

This has been fixed in <a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">version 0.1.1</a>. Enjoy!


In the code you write:

Code: Select all

// as the console's keyset doesn't have an id, it can't be overlayed


perhaps you should report a bug in bugzilla to add an id to the keyset
Henrik Gemal
Mozilla Evangelist
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter 0.2</a> now remembers up to ten of the most recently used filters. Confirm a filter with [Return] to add it to the list. Unwanted filters can be cleaned from the list through a right-click.

gemal wrote:perhaps you should report a bug in bugzilla to add an id to the keyset

This has been filed as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=296700">Bug 296700</a>.
AnonEmoose
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post by AnonEmoose »

awesome
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

I just posted a silent update which works also with nightlies having bug 301398 fixed (all since 2005-07-25).
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Zeniko, you might want to whip up a patch for that bug (296700) and ask Mike Connor for review. This is so trivial, I imagine it could get checked in any time, but I don't really see people jumping to fix it.
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

I've uploaded <a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter 0.2.9</a> which adds Mozilla Suite/SeaMonkey compatibility and one new feature for general testing: category filters.

Most messages in the console are actually categorized by Gecko as CSS and JavaScript errors. Accordingly, Console Filter understands now the following special terms: @css, @js, @js-content, @js-chrome, @js-xpconnect. These filter for (or when headed by a hyphen against) CSS, general JavaScript and specific JavaScript errors. You'll need those terms especially for the upcoming Firefox 1.5, where the Console is additionally cluttered with CSS errors.

Interestingly, strict warnings and some few errors remain without category... does anybody know whether this might be another Gecko bug?

On a different note: I've filed bug 302252 for the above mentioned problem caused by bug 301398.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Transferred bug 296700 to you, marked "[no l10n impact]" and "has patch".
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Post by Philip Chee »

Does not show up in SeaMonkey 1.0a when Multizilla is installed. Multizilla installs it's own version of the js console. I have uploaded a modded version here:http://www.extensionsmirror.nl/index.php?showtopic=4023.
All I did was to change the contents.rdf to also overlay the mutizilla version of the js console

Code: Select all

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
   <Seq about="urn:mozilla:package:root">
      <li resource="urn:mozilla:package:consolefilter"/>
   </Seq>
   
   <Description about="urn:mozilla:package:consolefilter" chrome:name="consolefilter"/>
   
   <Seq about="urn:mozilla:overlays">
      <li resource="chrome://global/content/console.xul"/>
      <li resource="chrome://multiviews/content/js-console/console.xul"/>
   </Seq>
   
   <Seq about="chrome://global/content/console.xul">
      <li>chrome://consolefilter/content/consolefilter.xul</li>
   </Seq>
   <Seq about="chrome://multiviews/content/js-console/console.xul">
      <li>chrome://consolefilter/content/consolefilter.xul</li>
   </Seq>
</RDF>
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

Post by gemal »

Henrik Gemal
Mozilla Evangelist
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

gemal wrote:https://bugzilla.mozilla.org/show_bug.cgi?id=296700 has now been fixed!

<a href="http://www.haslo.ch/zeniko/software/consolefilter.xpi">Console Filter 0.2.10</a> takes advantage of this bug fix, requiring thus Firefox 1.5 Beta or better (Firefox 1.0.x is still supported, and since this update also SeaMonkey/MultiZilla). Note that with this update the -@ filter is changed to the more logical @- (since -@ also filtered messages containing e-mail addresses).

Two more notes concerning the upcoming CF 0.3 release (scheduled for Firefox 1.5):
* Should Bug 306223 (or one of Bug 302211 and Bug 275265) get fixed in time, the console's loading time will get back to the level of CF 0.2. Until then the console loads all messages twice in order to enable the category filter.

* So far, CF focuses its own filter when the console is opened (instead of focusing nothing). Does this bother anybody - should I set the focus rather to the "Evaluate" text field?
User avatar
onemen
Posts: 1136
Joined: October 15th, 2004, 7:48 am

Post by onemen »

can u add Show All button to clear the filter like in about:config
Locked