#How to debug Zig with a debugger

1 messages · Page 1 of 1 (latest)

gloomy owl
#

Both LLDB and GDB can't print slice content ([]T). Is there a way to debug zig programs as convenient as C programs?

wary fox
#

use .ptr

gloomy owl
#

I know I can do x foo.ptr and stuff but it's not that convenient

#

foo[0] doesn't work

wooden fog
#

The lldb pretty printers support slices

#

and allow frame variable slice[5].field just fine

#

the gdb pretty printers look like they have support, but I haven't used them

graceful condor
#

is there any update on this? I'm wondering if zig has a sanctioned debugger or one that is known to work well

woven tundra
#

I believe most of the core team uses lldb now

#

So the lldb pretty printers are more up to date and complete

graceful condor
#

cool thanks

velvet jasper
#

if you're on windows, windbg preview seems to display slices properly in the watch window
visual studio and vscode don't for whatever reason 🤷