Special characters in JS cause debugger to fail



9 years ago
3 months ago


(Reporter: mkaply, Unassigned)


Firefox Tracking Flags

(Not tracked)




9 years ago
I had the following line in my JS:

/* Copyright © 2009 privacychoice LLC */

I couldn't view the source file in Venkman.

It brought up a XUL error that I couldn't completely see.

This was debugging an extension.

Comment 1

9 years ago
I can't reproduce this in "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv: Gecko/20091102 Firefox/3.5.5" with "Venkman version" using a single, simple HTML file with a <script> containing that comment.

This was being a little odd though:
 - Windows-1252: diamond "?" in Vnk source view, "©" in interactive session.
 - UTF-8 (w/ and w/o BOM): "©" in Vnk source view, "©" in interactive session.

Is your script inline or external, and what encoding are the HTML and JS files (including meta tag)?

Comment 2

9 years ago
Actually the extension I am debugging is on AMO with the bad char, so you can debug it directly:

Trackerwatcher - https://addons.mozilla.org/en-US/firefox/addon/14454

Here's what I did to recreate.

Fresh 3.6 beta 4 profile.
install venkman
Install trackerwatcher from above URL.

Open venkman.
Exclude browser files.
Try to open trackerwatcher.js

Here's what I get:

XML Parsing Error: not well-formed
Location: x-jsd:source?location=chrome%3A%2F%2Ftrackerwatcher%2Fcontent%2Ftrackerwatcher.js&instance=39
Line Number 4, Column 65:<line><margin x='f'>   </margin><num>   1</num> <c>/* Copyright ©2009 privacychoice LLC */</c></line>

Comment 3

9 years ago
As discussed on IRC, this appears to work fine (excepting the "?" display which is expected) in Firefox 3.5 but not in 3.6. No idea what would've changed there, though.

Comment 4

9 years ago
In case it's not obvious from the comments, the script file is encoded in ISO-8859-1 or Windows-1252 or similar, and Venkman expects UTF-8 by default. http://www.hacksrus.com/~ginda/venkman/faq/venkman-faq.html#2.21 has a method to give it a better hint.

The bug here is that instead of showing an unknown character ("?"), it's actually failing to load the source view at all.


2 years ago
Last Resolved: 2 years ago
Resolution: --- → WONTFIX


3 months ago
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.