私はtypescriptでe2eテストで角度アプリを持っており、私はVSCodeでデバッグを実行したい。私はread.meに行って、デバッグを実行する方法を見て、それは簡単でした。しかし、私の問題は、typescriptテストのブレークポイントが停止していないということです。 私はソースマップの問題が発生していないことがわかります。デバッグVSCodeでTypescript分度器テスト
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"stopOnEntry": false,
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"args": [
"${workspaceRoot}/protractor.conf.js"
]
}
]
}
protractor.conf.js
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: true,
beforeLaunch: function() {
require('ts-node').register({
project: 'e2e'
});
},
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter());
}
};
tsconfig.json
{
"compileOnSave": true,
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}
launch.json私は、TS-ノードはJSにTSをコンパイルし、おそらくその通りであることを理解生成元のマップではないか、特定の場所に格納されています
私は間違っていますか?
私は分度器がts-nodeがインストールするソースマップサポートを無効にすると思います。解決策がまだわからない – CletusW
@CletusWありがとう私はそれを試してみます –