# \#debugger

**URL:** https://ziggit.dev/tag/debugger/69.md

[Latest](https://ziggit.dev/latest.md) · [Categories](https://ziggit.dev/categories.md) · [Tags](https://ziggit.dev/tags.md)

---

## [Vscode debugger don't show variables and can't watch variables](https://ziggit.dev/t/vscode-debugger-dont-show-variables-and-cant-watch-variables/9629)

<div class="topic-metadata">

**Author:** [@yanfeigame](https://ziggit.dev/u/yanfeigame)\
**Replies:** 3\
**Last updated:** [October 26, 2026, 2:23am UTC](https://ziggit.dev/t/vscode-debugger-dont-show-variables-and-cant-watch-variables/9629 "2026-10-26T02:23:55Z")

</div>

I use vscode to learn zig. I install zig language plugin on vscode currently, it can set breakpoint, step-in, step-out, works fine. But I can’t see any variables on the left panel of vscode(debugger). It will show line "…

---

## [RadDebugger and Zig](https://ziggit.dev/t/raddebugger-and-zig/17826)

<div class="topic-metadata">

**Author:** [@igors84](https://ziggit.dev/u/igors84)\
**Replies:** 10\
**Last updated:** [October 25, 2026, 12:54am UTC](https://ziggit.dev/t/raddebugger-and-zig/17826 "2026-10-25T00:54:19Z")

</div>

Now that RadDebugger (alpha) is available for Linux I gave it a try on my Zig project. It is incredibly fast and smooth but I couldn’t find a way to make it usable with Zig types. I immediately went to see how will it ha…

---

## [How to print a slice as a string in lldb?](https://ziggit.dev/t/how-to-print-a-slice-as-a-string-in-lldb/17853)

<div class="topic-metadata">

**Author:** [@nilsj](https://ziggit.dev/u/nilsj)\
**Replies:** 5\
**Last updated:** [October 10, 2026, 8:25pm UTC](https://ziggit.dev/t/how-to-print-a-slice-as-a-string-in-lldb/17853 "2026-10-10T20:25:46Z")

</div>

I want to be able to read it, currently i get: (lldb) print path (\[\]const u8) len=7 { \[0\] = 116 \[1\] = 101 \[2\] = 115 \[3\] = 116 \[4\] = 46 \[5\] = 109 \[6\] = 100 } I’m using Jacobs fork.

---

## [RAD Debugger with "preliminary support for native Linux"](https://ziggit.dev/t/rad-debugger-with-preliminary-support-for-native-linux/17874)

<div class="topic-metadata">

**Author:** [@felixrabe](https://ziggit.dev/u/felixrabe)\
**Replies:** 0\
**Last updated:** [October 7, 2026, 7:06am UTC](https://ziggit.dev/t/rad-debugger-with-preliminary-support-for-native-linux/17874 "2026-10-07T07:06:46Z")

</div>

I’m intending to give this a try in the coming days. What are your experiences with it?

---

## [Needs help to figure out debugging](https://ziggit.dev/t/needs-help-to-figure-out-debugging/17571)

<div class="topic-metadata">

**Author:** [@Aleod](https://ziggit.dev/u/Aleod)\
**Replies:** 4\
**Last updated:** [September 11, 2026, 10:05pm UTC](https://ziggit.dev/t/needs-help-to-figure-out-debugging/17571 "2026-09-11T22:05:11Z")

</div>

Hello, I’m trying to figure out how to setup debugging for zig and I cannot figure out how to get it to work. For the record I’m not very familiar with the whole debugging. Was too lazy and print debugging kinda worked. …

---

## [Debugging Zig (with a debugger)](https://ziggit.dev/t/debugging-zig-with-a-debugger/7160)

<div class="topic-metadata">

**Author:** [@mnemnion](https://ziggit.dev/u/mnemnion)\
**Replies:** 50\
**Last updated:** [August 19, 2026, 3:26am UTC](https://ziggit.dev/t/debugging-zig-with-a-debugger/7160 "2026-08-19T03:26:45Z")

</div>

Debugging Zig code is a bit of a dark art at present:. There’s no official documentation on the subject, and the lore involved is scattered among blog posts, video, Ziggit questions, the Discord, and so on. So I thought…

---

## [Working Zig debugging in Zed](https://ziggit.dev/t/working-zig-debugging-in-zed/17186)

<div class="topic-metadata">

**Author:** [@lejmr](https://ziggit.dev/u/lejmr)\
**Replies:** 2\
**Last updated:** [August 12, 2026, 7:34pm UTC](https://ziggit.dev/t/working-zig-debugging-in-zed/17186 "2026-08-12T19:34:42Z")

</div>

I’m learning Zig by hand-writing a HOCON parser, and all I wanted was to put a breakpoint into a test and look inside my ArrayList. That turned into three fixes for the Zed zig extension, one one-line patch for the Zig c…

---

## [Why is the stack trace being outputted differently when \`dwarf\_format\` is not null?](https://ziggit.dev/t/why-is-the-stack-trace-being-outputted-differently-when-dwarf-format-is-not-null/16551)

<div class="topic-metadata">

**Author:** [@oscar\_1903](https://ziggit.dev/u/oscar_1903)\
**Replies:** 4\
**Last updated:** [July 8, 2026, 2:01pm UTC](https://ziggit.dev/t/why-is-the-stack-trace-being-outputted-differently-when-dwarf-format-is-not-null/16551 "2026-07-08T14:01:16Z")

</div>

I’m new to zig and low-level programming, I’ve been debugging in LLDB, and for LLDB to let me watch the variables in my code I found that I need to set the dwarf\_format to either @"64" or @"32", however when I do that, t…

---

## [WASM stack traces/debugging support in browsers](https://ziggit.dev/t/wasm-stack-traces-debugging-support-in-browsers/16360)

<div class="topic-metadata">

**Author:** [@xash](https://ziggit.dev/u/xash)\
**Replies:** 5\
**Last updated:** [June 27, 2026, 9:02am UTC](https://ziggit.dev/t/wasm-stack-traces-debugging-support-in-browsers/16360 "2026-06-27T09:02:36Z")

</div>

Hey, currently I have a project where I run some freestanding WASM blob in the browser. When it panics, firefox gives me nothing, but chromium gives me a stack trace of WASM addresses. I can use these with wasm-tools ad…

---

## [LENS - debugging and memory forensics library](https://ziggit.dev/t/lens-debugging-and-memory-forensics-library/15518)

<div class="topic-metadata">

**Author:** [@sabo](https://ziggit.dev/u/sabo)\
**Replies:** 0\
**Last updated:** [May 14, 2026, 11:51am UTC](https://ziggit.dev/t/lens-debugging-and-memory-forensics-library/15518 "2026-05-14T11:51:08Z")

</div>

LENS - debugging and memory forensics library Hello there! During the past couple of years, I’ve been developing custom tooling for debugging my Zig projects. I have found them to be quite useful and recently I improved…

---

## [Display slices in the debugger](https://ziggit.dev/t/display-slices-in-the-debugger/5079)

<div class="topic-metadata">

**Author:** [@mnemnion](https://ziggit.dev/u/mnemnion)\
**Replies:** 6\
**Last updated:** [February 13, 2026, 3:30pm UTC](https://ziggit.dev/t/display-slices-in-the-debugger/5079 "2026-02-13T15:30:05Z")

</div>

I’m debugging some slice-heavy code using lldb from VSCode, and it’s excessively difficult to follow, because the slices aren’t null-terminated, so the debugger displays arbitrary amounts of string, and I have to figure …

---

## [Debugging binaries built by the self-hosted backend](https://ziggit.dev/t/debugging-binaries-built-by-the-self-hosted-backend/14247)

<div class="topic-metadata">

**Author:** [@WillAvudim](https://ziggit.dev/u/WillAvudim)\
**Replies:** 2\
**Last updated:** [February 8, 2026, 5:18pm UTC](https://ziggit.dev/t/debugging-binaries-built-by-the-self-hosted-backend/14247 "2026-02-08T17:18:45Z")

</div>

I need to debug a binary produced by the Zig self-hosted backend. I couldn’t get the jacobly0/llvm-project to compile, and it looks stale, with the last update happening 3 years ago. Is the debugging section testing-zig-…

---

## [How to debug Zig with LLDB on Windows](https://ziggit.dev/t/how-to-debug-zig-with-lldb-on-windows/13862)

<div class="topic-metadata">

**Author:** [@vivraan](https://ziggit.dev/u/vivraan)\
**Replies:** 18\
**Last updated:** [January 10, 2026, 11:42am UTC](https://ziggit.dev/t/how-to-debug-zig-with-lldb-on-windows/13862 "2026-01-10T11:42:00Z")

</div>

New user here. Quick question: I am running Zig 0.15.2 on Windows 11, and I’ve been trying to debug my code. I suspect I won’t go too far, even if I knew how to use LLDB on a terminal (hopefully, soon I’ll be able to fa…

---

## [Can not debug zig with helix (lldb lldb-dap)](https://ziggit.dev/t/can-not-debug-zig-with-helix-lldb-lldb-dap/12991)

<div class="topic-metadata">

**Author:** [@dacec354](https://ziggit.dev/u/dacec354)\
**Replies:** 4\
**Last updated:** [November 28, 2025, 10:57am UTC](https://ziggit.dev/t/can-not-debug-zig-with-helix-lldb-lldb-dap/12991 "2025-11-28T10:57:15Z")

</div>

I’m using helix as my main editor writing zig. Most of time experiences ars nice like highliting, lsp, code navigation …, except for debugging. When launching debug whith binary, I got a Failed to start debug client: ser…

---

## [No symbol in LLDB debugger](https://ziggit.dev/t/no-symbol-in-lldb-debugger/12511)

<div class="topic-metadata">

**Author:** [@sundavarblaka](https://ziggit.dev/u/sundavarblaka)\
**Replies:** 4\
**Last updated:** [October 14, 2025, 6:56pm UTC](https://ziggit.dev/t/no-symbol-in-lldb-debugger/12511 "2025-10-14T18:56:42Z")

</div>

I’m trying to debug a small zig program while learning the language. From other posts I tried to use lldb, but it seems to find no main function nor other symbols. This is the simple program I’m using as a test (copied …

---

## [Can't print local variables when debug with lldb](https://ziggit.dev/t/cant-print-local-variables-when-debug-with-lldb/10689)

<div class="topic-metadata">

**Author:** [@bagualing](https://ziggit.dev/u/bagualing)\
**Replies:** 12\
**Last updated:** [September 27, 2025, 8:01pm UTC](https://ziggit.dev/t/cant-print-local-variables-when-debug-with-lldb/10689 "2025-09-27T20:01:09Z")

</div>

Hi, I’m a newbie in zig. Today I attempted to debug a simple zig program in VSCode with CodeLLDB plugin, I got a empty list in the ‘Local’ node of variables tree after debugger running. So, I directly ran the lldb com…

---

## [Debug Zig on Windows](https://ziggit.dev/t/debug-zig-on-windows/11549)

<div class="topic-metadata">

**Author:** [@nagisa](https://ziggit.dev/u/nagisa)\
**Replies:** 9\
**Last updated:** [August 19, 2025, 12:28pm UTC](https://ziggit.dev/t/debug-zig-on-windows/11549 "2025-08-19T12:28:58Z")

</div>

Hello, I’ve searched online and found a few posts about setting zig up for debugging on windows with vs code but I cannot get it to work. I’ve been trying on and off for the past 2 months but for some reason I just canno…

---

## [Zig for an Educational Operating System](https://ziggit.dev/t/zig-for-an-educational-operating-system/11534)

<div class="topic-metadata">

**Author:** [@agl-alexglopez](https://ziggit.dev/u/agl-alexglopez)\
**Replies:** 6\
**Last updated:** [August 18, 2025, 9:54pm UTC](https://ziggit.dev/t/zig-for-an-educational-operating-system/11534 "2025-08-18T21:54:40Z")

</div>

Recently, I have been thinking about operating systems that aim to help people learn about kernel development. Two examples are PintOS from Stanford and xv6 from MIT. Both are written in C. Feel free to comment with othe…

---

## [Zig tests, errdefer, and debuggers](https://ziggit.dev/t/zig-tests-errdefer-and-debuggers/11337)

<div class="topic-metadata">

**Author:** [@glfmn](https://ziggit.dev/u/glfmn)\
**Replies:** 5\
**Last updated:** [August 6, 2025, 12:04pm UTC](https://ziggit.dev/t/zig-tests-errdefer-and-debuggers/11337 "2025-08-06T12:04:32Z")

</div>

Wrote a blog post with some things that have helped me with debugging code in tests.

---

## [Zig C++ SFML compiler error](https://ziggit.dev/t/zig-c-sfml-compiler-error/11134)

<div class="topic-metadata">

**Author:** [@Renan2010](https://ziggit.dev/u/Renan2010)\
**Replies:** 0\
**Last updated:** [July 22, 2025, 8:06pm UTC](https://ziggit.dev/t/zig-c-sfml-compiler-error/11134 "2025-07-22T20:06:49Z")

</div>

Zig Version 0.15.0-dev.1092+d772c0627 Steps to Reproduce and Observed Behavior I was testing zig’s C/C++ compiler and came across this while testing SFML compiling with zig c++ \[renan@archlinux src\]$ zig c++ main.cpp -…

---

## [Cannot find debug symbol (No symbol in current context)](https://ziggit.dev/t/cannot-find-debug-symbol-no-symbol-in-current-context/9159)

<div class="topic-metadata">

**Author:** [@ferrishu3886](https://ziggit.dev/u/ferrishu3886)\
**Replies:** 8\
**Last updated:** [July 17, 2025, 6:33am UTC](https://ziggit.dev/t/cannot-find-debug-symbol-no-symbol-in-current-context/9159 "2025-07-17T06:33:01Z")

</div>

I just start to learn Zig. I have a very simple program const std = @import("std"); pub const User = struct { power: u64, name: \[\]const u8, }; pub fn main() void { const user = User{ .power = 9001, .name =…

---

## [How can I use the Zig build system to compile and debug a pure C++ project?](https://ziggit.dev/t/how-can-i-use-the-zig-build-system-to-compile-and-debug-a-pure-c-project/10287)

<div class="topic-metadata">

**Author:** [@inschrift.spruch](https://ziggit.dev/u/inschrift.spruch)\
**Replies:** 3\
**Last updated:** [May 28, 2025, 10:48am UTC](https://ziggit.dev/t/how-can-i-use-the-zig-build-system-to-compile-and-debug-a-pure-c-project/10287 "2025-05-28T10:48:51Z")

</div>

As mentioned, I am using VSCode + CodeLLDB. My project is Sac-Zig-build. Now I have a general understanding of the normal compilation process. When linkLibCpp() is called, it links to the libc++ that comes with Zig. Wh…

---

## [Can I call my debugging Zig functions inside lldb?](https://ziggit.dev/t/can-i-call-my-debugging-zig-functions-inside-lldb/9226)

<div class="topic-metadata">

**Author:** [@sohro\_desu](https://ziggit.dev/u/sohro_desu)\
**Replies:** 9\
**Last updated:** [March 26, 2025, 10:38pm UTC](https://ziggit.dev/t/can-i-call-my-debugging-zig-functions-inside-lldb/9226 "2025-03-26T22:38:53Z")

</div>

I’ve come to know that we can’t have nice things such as printing slices or slice expressions and much more in a debugger in Zig, or in low-level programming languages like C in general. At least, that’s how it feels to…

---

## [Trouble building Zig fork of LLDB](https://ziggit.dev/t/trouble-building-zig-fork-of-lldb/9066)

<div class="topic-metadata">

**Author:** [@TheShinx317](https://ziggit.dev/u/TheShinx317)\
**Replies:** 0\
**Last updated:** [March 14, 2025, 10:16pm UTC](https://ziggit.dev/t/trouble-building-zig-fork-of-lldb/9066 "2025-03-14T22:16:02Z")

</div>

Hey everyone! After reading this reply from Andrew Kelley, I attempted to build Jacob Young’s fork of LLDB. I read through: the instruction on the zig repo wiki the instructions for optional dependencies I installed…

---

## [How can I debug JIT-built zig tools like Aro translate-c?](https://ziggit.dev/t/how-can-i-debug-jit-built-zig-tools-like-aro-translate-c/9043)

<div class="topic-metadata">

**Author:** [@dpirch](https://ziggit.dev/u/dpirch)\
**Replies:** 2\
**Last updated:** [March 14, 2025, 12:00pm UTC](https://ziggit.dev/t/how-can-i-debug-jit-built-zig-tools-like-aro-translate-c/9043 "2025-03-14T12:00:57Z")

</div>

I want to step through aro\_translate\_c.zig in a debugger to see how it works. I have a debug build of zig and debugging the clang-based translate-c with lldb works fine, but it doesn’t work for Aro translate-c (i.e. zig…

---

## [Unrecognised Instruction when using Valgrind](https://ziggit.dev/t/unrecognised-instruction-when-using-valgrind/8178)

<div class="topic-metadata">

**Author:** [@n0s4](https://ziggit.dev/u/n0s4)\
**Replies:** 4\
**Last updated:** [January 26, 2025, 11:06pm UTC](https://ziggit.dev/t/unrecognised-instruction-when-using-valgrind/8178 "2025-01-26T23:06:24Z")

</div>

I’m trying to get a look at my programs memory usage using valgrind’s ‘massif’ tool. I built my program in ReleaseFast mode. $ valgrind --tool=massif ./zig-out/bin/trie ==25613== Massif, a heap profiler ==25613== Copyri…

---

## [Optimized code debugging](https://ziggit.dev/t/optimized-code-debugging/6210)

<div class="topic-metadata">

**Author:** [@ssilnicki-dev](https://ziggit.dev/u/ssilnicki-dev)\
**Replies:** 8\
**Last updated:** [October 1, 2024, 11:23pm UTC](https://ziggit.dev/t/optimized-code-debugging/6210 "2024-10-01T23:23:53Z")

</div>

Hi All! what is best (convenient) option to suppress optimizing out some variable in order to break and observe its value in debug session? So far I have used to use this controversial practice of assembly injection: …

---

## [Producing DWARF on PE/COFF targets](https://ziggit.dev/t/producing-dwarf-on-pe-coff-targets/5485)

<div class="topic-metadata">

**Author:** [@tliltocatl](https://ziggit.dev/u/tliltocatl)\
**Replies:** 3\
**Last updated:** [August 4, 2024, 10:31am UTC](https://ziggit.dev/t/producing-dwarf-on-pe-coff-targets/5485 "2024-08-04T10:31:58Z")

</div>

I’m playing with UEFI and right now the compiler outputs .pdb file for debug symbols which is 0.001% as useful as a punched card deck unless you use Microsoft tooling. LLVM has a way to produce separate DWARF for PE file…

---

## [Is there a way to debug tests when run as a build step?](https://ziggit.dev/t/is-there-a-way-to-debug-tests-when-run-as-a-build-step/5126)

<div class="topic-metadata">

**Author:** [@nairou](https://ziggit.dev/u/nairou)\
**Replies:** 4\
**Last updated:** [July 14, 2024, 4:10pm UTC](https://ziggit.dev/t/is-there-a-way-to-debug-tests-when-run-as-a-build-step/5126 "2024-07-14T16:10:11Z")

</div>

I have a build step in my build.zig which runs all available tests: const lib\_tests = b.addTest(.{ .root\_source\_file = b.path("src/lib.zig"), .target = target, .optimize = optimize, }); lib\_tests.addIncludeP…
