Requires zig 0.14.0-dev.2064+b5cafe223
Recommended to use zls commit b2e89dfe92850cf02cbd4b73004aaaecd5cf1739
- install zig & add to path
- for asahi linux: apply patch to
lib/std/mem.zig
:pub const page_size = ... .arch64 => .{ ... .visionos }
add, .linux
- for asahi linux: apply patch to
git clone https://github.com/zigtools/zls
zig build -Doptimize=ReleaseSafe
- add zls to path from
zig-out/bin/zls
# test
zig build test
# run blockeditor
zig build run --prominent-compile-errors
# run with tracy
zig build run -Dtracy -Doptimize=ReleaseSafe --prominent-compile-errors
- install rr debugger
- install midas for vscode
- cd to package
- build package:
zig build
- record application:
rr record ./zig-out/bin/test
- rr may require you to make a system configuration change, or alternatively run with
-n
.-n
is slow, so make the system configuration change.
- rr may require you to make a system configuration change, or alternatively run with
- run "rr" debug profile in vscode to replay trace
- to run gdb commands, open the "debug console": click the problems button at the bottom of
vscode and switch tabs to debug console, then select rr.
- an example command is
print &myvar
to get the address of a variable - to read memory (vscode's "hex editor" thing doesn't seem to work at all), use
x/LENcb value
egx/160cb myslice.ptr
. to read array items, canprint myslice.ptr[index]
- an example command is
- to run gdb commands, open the "debug console": click the problems button at the bottom of
vscode and switch tabs to debug console, then select rr.