phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

Stack trace does not show column when exception occurs.

Open fmmontas opened this issue 12 years ago • 17 comments

Whenever a javascript exception occurs the stack trace only contains the line number and not the column, ex. 'path/to/file/someFile.js:56' where 56 is the line number. Without the column number source maps will not currently work. Given an exception occurs 'path/to/file/someFile.js:56:11' where line number is 56 and column number is 11 seems like the common format.

fmmontas avatar Jun 04 '14 13:06 fmmontas

:+1: Running tests in Karma with source maps, and I really like that PhantomJS gives better error messages for failures (TypeError: 'undefined' is not a function (evaluating 'calc.add()') vs Chrome's plain TypeError: undefined is not a function), but unfortunately, no column number breaks Karma's ability to use source maps

NickClark avatar Jun 05 '14 19:06 NickClark

:+1:

samu avatar Dec 07 '14 13:12 samu

+1 - currently I need to use Chrome in Karma, because sourcemaps don't work in PhantomJS :(

jtomaszewski avatar Jan 10 '15 11:01 jtomaszewski

:+1:

leonardfactory avatar Jan 20 '15 00:01 leonardfactory

+1

dtryon avatar Feb 26 '15 10:02 dtryon

+1

alexbuijs avatar Jul 13 '15 07:07 alexbuijs

+1

andras-tim avatar Jul 26 '15 09:07 andras-tim

+1

decates avatar Sep 15 '15 15:09 decates

+1 this is essential for running unit tests with Karma and PhantomJS

supersonicclay avatar Sep 15 '15 19:09 supersonicclay

+1

danieljsinclair avatar Sep 16 '15 12:09 danieljsinclair

+1

axelpale avatar Oct 01 '15 22:10 axelpale

:+1:

matthauck avatar Mar 10 '16 05:03 matthauck

Hmm. Looks like this may not be a phantomjs issue anymore. Just updated to phantomjs-prebuilt 2.1.5, and column numbers are now present!

matthauck avatar Mar 10 '16 06:03 matthauck

Hmm, I've still the same problem with phantomjs 2.1.1 (phantomjs-prebuilt 2.1.14) on windows.

I see phantomjs://code/test.js:4 in global code when I execute the script

setTimeout(function () {
    phantom.exit();
}, 0);
throw '';

Still no column numbers (and therefore no chance to get source maps to work correctly)..

WolfgangKluge avatar Feb 14 '17 08:02 WolfgangKluge

Hmm, I've still the same problem with phantomjs 2.1.1 (phantomjs-prebuilt 2.1.14) on windows.

Same here. If I run the tests via Karma in Chrome / Firefox the stacktrace uses sourcemaps correctly.

JoshSchreuder avatar Mar 02 '17 01:03 JoshSchreuder

@Vitallium I don't think this is fixed, so any chance of re-opening it?

dreadwail avatar Mar 05 '17 05:03 dreadwail

+1

rmartins90 avatar Jun 29 '17 11:06 rmartins90