Add debugging support to jest-runner

This adds debugging support to jest-runner for the integration tests
when they are run from the `out` directory. Unfortunately, this removes
the ability to debug the non-integration tests, such as the pure tests.
This commit is contained in:
Koen Vlaswinkel 2022-11-25 12:05:19 +01:00
Родитель e60ed32731
Коммит 927817f99d
3 изменённых файлов: 12 добавлений и 1 удалений

1
.vscode/extensions.json поставляемый
Просмотреть файл

@ -6,6 +6,7 @@
"amodio.tsl-problem-matcher",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"Orta.vscode-jest",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.

6
.vscode/settings.json поставляемый
Просмотреть файл

@ -42,6 +42,12 @@
"LANG": "en-US",
"TZ": "UTC"
},
"jestrunner.debugOptions": {
"attachSimplePort": 9223,
"env": {
"VSCODE_WAIT_FOR_DEBUGGER": "true",
}
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,

Просмотреть файл

@ -17,7 +17,11 @@ const config = {
};
if (process.env.VSCODE_INSPECTOR_OPTIONS) {
config.launchArgs?.push("--inspect-extensions", "9223");
if (process.env.VSCODE_WAIT_FOR_DEBUGGER === "true") {
config.launchArgs?.push("--inspect-brk-extensions", "9223");
} else {
config.launchArgs?.push("--inspect-extensions", "9223");
}
}
module.exports = {