Make intervalDebugger testdata sourcemapped
This commit is contained in:
Родитель
ff55b4ecc0
Коммит
c63e5d30e4
|
@ -1,10 +1,12 @@
|
|||
.DS_Store
|
||||
node_modules/
|
||||
out/
|
||||
lib/
|
||||
*.vsix
|
||||
vscode-chrome-debug.txt
|
||||
typings/
|
||||
.browse.VC.db
|
||||
vscode-chrome-debug.txt
|
||||
npm-debug.log
|
||||
*.vsix
|
||||
|
||||
lib/
|
||||
node_modules/
|
||||
/out/
|
||||
typings/
|
||||
testapp/.vscode/chrome
|
||||
npm-debug.log
|
||||
testapp/**/out/
|
|
@ -24,7 +24,8 @@
|
|||
"args": [
|
||||
"-u", "tdd",
|
||||
"--colors",
|
||||
"out/test/**/*.test.js"
|
||||
"out/test/**/*.test.js",
|
||||
"--timeout", "1800000"
|
||||
],
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/out/**/*.js"]
|
||||
|
|
|
@ -8,13 +8,11 @@ import * as path from 'path';
|
|||
const {createServer} = require('http-server');
|
||||
|
||||
import {DebugClient} from 'vscode-debugadapter-testsupport';
|
||||
import {DebugProtocol} from 'vscode-debugprotocol';
|
||||
|
||||
import * as testUtils from './intTestUtils';
|
||||
import * as testSetup from './testSetup';
|
||||
|
||||
const DATA_ROOT = testSetup.DATA_ROOT;
|
||||
const THREAD_ID = testUtils.THREAD_ID;
|
||||
|
||||
suite('Chrome Debug Adapter etc', () => {
|
||||
let dc: DebugClient;
|
||||
|
@ -49,7 +47,7 @@ suite('Chrome Debug Adapter etc', () => {
|
|||
test('should stop on debugger statement in file:///', () => {
|
||||
const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger');
|
||||
const launchFile = path.join(testProjectRoot, 'index.html');
|
||||
const breakFile = path.join(testProjectRoot, 'app.js');
|
||||
const breakFile = path.join(testProjectRoot, 'out/app.js');
|
||||
const DEBUGGER_LINE = 2;
|
||||
|
||||
return Promise.all([
|
||||
|
@ -61,18 +59,23 @@ suite('Chrome Debug Adapter etc', () => {
|
|||
|
||||
test('should stop on debugger statement in http://localhost', () => {
|
||||
const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger');
|
||||
const breakFile = path.join(testProjectRoot, 'app.js');
|
||||
const breakFile = path.join(testProjectRoot, 'out/app.js');
|
||||
const DEBUGGER_LINE = 2;
|
||||
|
||||
const server = createServer({ root: testProjectRoot })
|
||||
.listen(7890);
|
||||
const server = createServer({ root: testProjectRoot });
|
||||
server.listen(7890);
|
||||
|
||||
return Promise.all([
|
||||
dc.configurationSequence(),
|
||||
dc.launch({ url: 'http://localhost:7890' }),
|
||||
dc.launch({ url: 'http://localhost:7890', webRoot: testProjectRoot }),
|
||||
dc.assertStoppedLocation('debugger statement', { path: breakFile, line: DEBUGGER_LINE } )
|
||||
])
|
||||
.then(() => server.close());
|
||||
.then(
|
||||
() => server.close(),
|
||||
e => {
|
||||
server.close();
|
||||
throw e;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,8 +1,8 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="app.js"></script>
|
||||
<script src="out/app.js"></script>
|
||||
<body>
|
||||
<h1>Hello, world!</h1>
|
||||
<h1>testdata/intervalDebugger</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
function debuggerStatement() {
|
||||
debugger;
|
||||
}
|
||||
setInterval(debuggerStatement, 100);
|
||||
//# sourceMappingURL=app.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;IACI,QAAQ,CAAC;AACb,CAAC;AAED,WAAW,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC"}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"outDir": "out"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче