Since recently upgrading to the latest angular-cli
and angular
, I no longer see source-maps in the Chrome Karma debug runner
.
Having done a bit of research I came across the ng test --sourcemaps=true
option but that has made no difference, there is no webpack://
folder like there used to be in the chrome debug tools source tab.
ng -v
log:
@angular/cli: 1.1.3
node: 6.9.4
os: win32 x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.3
@angular/compiler-cli: 4.2.4
@angular/language-service: 4.2.4
karma.conf:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
//require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
// coverageIstanbulReporter: {
// reports: ['html', 'lcovonly'],
// fixWebpackSourcePaths: true
// },
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
browsers: ['Chrome'],
logLevel: config.LOG_DEBUG,
autoWatch: true,
singleRun: false,
sourceMaps: true,
captureTimeout: 25000,
browserDisconnectTolerance: 3, //this one helps
browserDisconnectTimeout: 25000,
browserNoActivityTimeout: 25000,
skipFiles: [
"node_modules/**/*"
],
webRoot: "${workspaceRoot}"
});
};