dawn_node: Add documentation on how you debug TS
Change-Id: Iadaec50162da6f958016ec22f69623ab58ff461b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66922 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
f8c23da029
commit
2754900069
|
@ -72,6 +72,40 @@ For example, on Windows, to use the d3dcompiler_47.dll from a Chromium checkout,
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that we pass `--verbose` above so that all test output, including the dumped shader, is written to stdout.
|
Note that we pass `--verbose` above so that all test output, including the dumped shader, is written to stdout.
|
||||||
|
|
||||||
|
## Debugging TypeScript with VSCode
|
||||||
|
|
||||||
|
Open or create the `.vscode/launch.json` file, and add:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Debug with node",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"outFiles": [ "./**/*.js" ],
|
||||||
|
"args": [
|
||||||
|
"-e", "require('./src/common/tools/setup-ts-in-node.js');require('./src/common/runtime/cmdline.ts');",
|
||||||
|
"--", "dummy-arg",
|
||||||
|
"--gpu-provider",
|
||||||
|
"[path-to-dawn.node]", // REPLACE: [path-to-dawn.node]
|
||||||
|
"[test-query]", // REPLACE: [test-query]
|
||||||
|
],
|
||||||
|
"cwd": "[cts-root]" // REPLACE: [cts-root]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Replacing:
|
||||||
|
|
||||||
|
- `[cts-root]` with the path to the CTS root directory. If you are editing the `.vscode/launch.json` from within the CTS workspace, then you may use `${workspaceFolder}`.
|
||||||
|
- `[path-to-dawn.node]` this the path to the `dawn.node` module built by the [build step](#Build)
|
||||||
|
- `test-query` with the test query string. Example: `webgpu:shader,execution,builtin,abs:*`
|
||||||
|
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
|
|
||||||
- Many WebGPU CTS tests are currently known to fail
|
- Many WebGPU CTS tests are currently known to fail
|
||||||
|
|
Loading…
Reference in New Issue