Skip to content

Add debugging support for Jest integration tests#1793

Merged
koesie10 merged 1 commit intojest-migration/integration-testsfrom
jest-migration/debug
Nov 25, 2022
Merged

Add debugging support for Jest integration tests#1793
koesie10 merged 1 commit intojest-migration/integration-testsfrom
jest-migration/debug

Conversation

@koesie10
Copy link
Copy Markdown
Member

Since we are launching a completely different process for the extension tests than the process that is launched by VSCode, we need to add some special handling for the debugging.

This will let the extension host/VSCode expose a debugging port, which VSCode will then connect to. This is "less desirable than letting the bootloader do its thing", but a packaged VSCode application does not allow using the bootloader (NODE_OPTIONS=--require=...). Therefore, we have to fallback to this option.

See: https://github.com/microsoft/vscode-js-debug/blob/47c60558ec31902f42c255abb9b460078df02f9d/src/configuration.ts#L405-L411

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

Since we are launching a completely different process for the extension
tests than the process that is launched by VSCode, we need to add some
special handling for the debugging.

This will let the extension host/VSCode expose a debugging port, which
VSCode will then connect to. This is "less desirable than letting the
bootloader do its thing", but a packaged VSCode application does not
allow using the bootloader (`NODE_OPTIONS`=`--require=...`). Therefore,
we have to fallback to this option.

See: https://github.com/microsoft/vscode-js-debug/blob/47c60558ec31902f42c255abb9b460078df02f9d/src/configuration.ts#L405-L411
@koesie10 koesie10 requested a review from a team November 25, 2022 09:44
@koesie10 koesie10 requested a review from a team as a code owner November 25, 2022 09:44
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legend!

@koesie10 koesie10 merged commit 754cad3 into jest-migration/integration-tests Nov 25, 2022
@koesie10 koesie10 deleted the jest-migration/debug branch November 25, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants