diff --git a/lib/runner.js b/lib/runner.js index 08b6c3f52..fc722da4e 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -349,6 +349,9 @@ Runner.prototype.setupGlobals_ = function(driver) { global.$$ = browser.$$; global.element = browser.element; global.by = global.By = protractor.By; + + // Enable sourcemap support for stack traces. + require('source-map-support').install(); }; /** diff --git a/package.json b/package.json index cbd7be8c6..a844df3ee 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "adm-zip": "0.4.4", "optimist": "~0.6.0", "q": "1.0.0", - "lodash": "~2.4.1" + "lodash": "~2.4.1", + "source-map-support": "~0.2.6" }, "devDependencies": { "expect.js": "~0.2.0",