From 04a37637fddba7b97b13c35cfd04b7200fcf74ed Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 19 Jun 2024 20:26:42 +0800 Subject: [PATCH] document how to debug TypeScript in vscode closes https://github.com/oxc-project/oxc/issues/3732 --- src/docs/contribute/debugging.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/docs/contribute/debugging.md b/src/docs/contribute/debugging.md index 9e088bdb38..d8d3aec48e 100644 --- a/src/docs/contribute/debugging.md +++ b/src/docs/contribute/debugging.md @@ -31,3 +31,12 @@ rust-lldb -- ./target/release/oxlint ``` Once it launches, press `r` for running the program. + +## Debug TypeScript in VSCode + +According to their [debugging guide](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md#debugging-the-tests), in the TypeScript repository: + +- rename `.vscode/launch.template.json` to `launch.json` +- set a breakpoint somewhere in TypeScript's source code +- create a `test.ts` or open any test file of interest +- From the menu "Run - Debugging", or press F5