env-js icon indicating copy to clipboard operation
env-js copied to clipboard

Add references to specific JS files in backtrace

Open mcmire opened this issue 15 years ago • 1 comments

Quite often I see "inline's" in backtraces and they are pretty maddening. Ideally they should be replaced with references to URLs, or filenames if possible. Here's an example backtrace:

Johnson::Error in 'Feature: Gift this (under Javascript) Scenario: Choosing to gift items and going forward'
b is null
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/static.js:1218 [JavaScript]
inline:2302 [JavaScript]
inline:431 [JavaScript]
inline:139 [JavaScript]
inline:392 [JavaScript]
inline:5523 [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2193 [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2191:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/env.js:2324:in `__dispatchEvent__' [JavaScript]
/Library/Ruby/Gems/1.8/gems/envjs-0.3.6/lib/envjs/static.js:1718 [JavaScript]
/Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ruby_land_proxy.rb:110:in `method_missing'
...

mcmire avatar Jul 05 '10 21:07 mcmire

Actually, on further investigation (I think I knew this but forgot) I think these are coming from scriptlets, e.g.,

. Does that sound right?

I'm not sure if that's right or not: I'm not sure where those line numbers are coming from. You can't have 5523 lines of on*="..." ..

But if that is the case, at this point, I don't see a quick fix. It doesn't look like the HTML parser gives us any location info when it emits new objects.

smparkes avatar Jul 06 '10 18:07 smparkes