-
Install node. Note: I recommend using nvm(mac/linux) or nvm-windows(windows).
-
run these commands:
git clone https://github.com/webgpu/webgpu-debugger.git cd webgpu-debugger npm ci
npm start
It should open a browser to http://localhost:3000/example/
. Edits to the code should end up showing up live in the browser.
npm run build
This builds 3 libraries.
-
the
capture
librarydist/capture.js
usage:
import { webgpuDebugger } from 'dist/capture.js ... const trace = await webgpuDebugger.traceFrame();
-
the
replay
librarydist/replay.js
stand alone usage:
TBD
usage with capture
TBD
-
the 'debugger' in
dist/webgpu-debugger.js
usage:
import `dist/webgpu-debugger.js`;
or
<script src="dist/webgpu-debugger.js"></script>
Before you push a change please run npm run check
or, better yet, make it
automatic by putting
npm run check
In .git/hooks/pre-push
and then set the executable bit chmod u+x .git/hooks/pre-push
We use prettier
to format code so if you find errors, some of them may be able to be
fixed with npm run fix
.