readyou / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Add line numbers to debug output #201

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running JSDT, I get output like this:

>> WARNING: Malformed parameter list. Can't parse code.
>> WARNING: Mismatched } character. Can't parse code in file
javascripts/Z/Item.js.
>> WARNING: The symbol 'Z.Item' is documented more than once.
>> WARNING: Overwriting symbol documentation for: Z.Item.
>> WARNING: Malformed parameter list. Can't parse code.
>> WARNING: Mismatched } character. Can't parse code in file
javascripts/Z/Item.js.

Unfortunately, without line numbers, it's difficult to track down exactly
where the problems are.  JSDT should display the current line number
alongside each parser error.

Original issue reported on code.google.com by broofa on 12 Feb 2009 at 5:00

GoogleCodeExporter commented 9 years ago
Keeping track of which file, and line each symbol belongs to is non-trivial, 
but I see why it would be useful.

Original comment by micmath on 15 Feb 2009 at 12:12

GoogleCodeExporter commented 9 years ago
Another consideration here is that lack of the line number limits the extent to 
which
jsdt can be integrated into various IDEs.  E.g. I'm sure there is more than one
Eclipse/TextMate user out there who'd be interested in having a way to run jsdt 
from
within the IDE and navigate to where the errors are. (Which, btw, argues for 
using an
error/log syntax that IDEs already know about.)

Thanks for accepting this, btw!

Original comment by broofa on 15 Feb 2009 at 2:58

GoogleCodeExporter commented 9 years ago
The fact that someone wants to use JsDoc Toolkit to integrate with their 
favorite software argues for making 
JsDoc Toolkit open source and free to customize: two things I've already done. 
Many people have done exactly 
this in fact (with Maven, for example). I personally don't use Maven, Eclipse 
or TextMate, so for me this is staying 
a low priority. I have wished for better error messages myself though whilst 
debugging documentation so I'll be 
glad to work on it, I just know it's probably hard to do and I may not 
accomplish it very soon.

Original comment by micmath on 15 Feb 2009 at 4:04

GoogleCodeExporter commented 9 years ago
Workaround:

Utilized JSLint by Douglas Crockford for debugging @ www.jslint.com
help and community for this tool @ 
http://tech.groups.yahoo.com/group/jslint_com/

use the following as a JSlint header for what I consided currently the best 
options

/*jslint white: true, browser: true, devel: true, windows: true, sub: true, 
undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: 
true, immed: true, strict: true */

The Community site for JSLint has my Global listing for vars I avoid.

Original comment by abyss...@gmail.com on 5 Jul 2010 at 3:13

GoogleCodeExporter commented 9 years ago
Also, now you can use the jsdebug.jar instead of jsrun.jar to open up a full 
blown GUI debugger. JSDoc 3 will have file names and line numbers associated 
with each documented symbol.

Original comment by micmath on 5 Jul 2010 at 3:37