diff --git a/generators/app/package.json b/generators/app/package.json index 9353dc93..70706604 100644 --- a/generators/app/package.json +++ b/generators/app/package.json @@ -7,6 +7,7 @@ "@types/glob": "^7.2.0", "@types/mocha": "^9.1.0", "@types/node": "14.x", + "@types/source-map-support": "^0.5.4", "@typescript-eslint/eslint-plugin": "^5.12.1", "@typescript-eslint/parser": "^5.12.1", "eslint": "^8.9.0", @@ -20,6 +21,7 @@ "concurrently": "^5.3.0", "css-loader": "^4.2.0", "fork-ts-checker-webpack-plugin": "^5.0.14", + "source-map-support": "^0.5.21", "style-loader": "^1.2.1", "ts-loader": "^9.2.6", "vscode-dts": "^0.3.3", diff --git a/generators/app/templates/ext-command-ts/package.json b/generators/app/templates/ext-command-ts/package.json index 771519d7..00cfdfcb 100644 --- a/generators/app/templates/ext-command-ts/package.json +++ b/generators/app/templates/ext-command-ts/package.json @@ -36,11 +36,13 @@ <%- dep("@types/glob") %>, <%- dep("@types/mocha") %>, <%- dep("@types/node") %>, + <%- dep("@types/source-map-support") %>, <%- dep("@typescript-eslint/eslint-plugin") %>, <%- dep("@typescript-eslint/parser") %>, <%- dep("eslint") %>, <%- dep("glob") %>, <%- dep("mocha") %>, + <%- dep("source-map-support") %>, <%- dep("typescript") %>, <%- dep("@vscode/test-electron") %><% if (insiders) { %>, <%- dep("vscode-dts") %><% } %> diff --git a/generators/app/templates/ext-command-ts/src/test/suite/index.ts b/generators/app/templates/ext-command-ts/src/test/suite/index.ts index 7029e38e..be9808b9 100644 --- a/generators/app/templates/ext-command-ts/src/test/suite/index.ts +++ b/generators/app/templates/ext-command-ts/src/test/suite/index.ts @@ -1,8 +1,12 @@ import * as path from 'path'; import * as Mocha from 'mocha'; import * as glob from 'glob'; +import * as sm from 'source-map-support'; export function run(): Promise { + // Install support for source map files in stack traces. + sm.install(); + // Create the mocha test const mocha = new Mocha({ ui: 'tdd', diff --git a/generators/app/templates/ext-command-ts/vscode-webpack/package.json b/generators/app/templates/ext-command-ts/vscode-webpack/package.json index fc2855ce..f33b7db4 100644 --- a/generators/app/templates/ext-command-ts/vscode-webpack/package.json +++ b/generators/app/templates/ext-command-ts/vscode-webpack/package.json @@ -39,11 +39,13 @@ <%- dep("@types/glob") %>, <%- dep("@types/mocha") %>, <%- dep("@types/node") %>, + <%- dep("@types/source-map-support") %>, <%- dep("@typescript-eslint/eslint-plugin") %>, <%- dep("@typescript-eslint/parser") %>, <%- dep("eslint") %>, <%- dep("glob") %>, <%- dep("mocha") %>, + <%- dep("source-map-support") %>, <%- dep("typescript") %>, <%- dep("ts-loader") %>, <%- dep("webpack") %>, diff --git a/generators/app/templates/ext-notebook-renderer/src/test/suite/index.ts b/generators/app/templates/ext-notebook-renderer/src/test/suite/index.ts index d82c1e24..b1ccdf7f 100644 --- a/generators/app/templates/ext-notebook-renderer/src/test/suite/index.ts +++ b/generators/app/templates/ext-notebook-renderer/src/test/suite/index.ts @@ -1,8 +1,12 @@ import * as path from 'path'; import * as Mocha from 'mocha'; import * as glob from 'glob'; +import * as sm from 'source-map-support'; export function run(): Promise { + // Install support for source map files in stack traces. + sm.install(); + // Create the mocha test const mocha = new Mocha({ ui: 'tdd',