I use raddebugger on windows as my daily driver. You can add type views in the “Type View” tab, but I don’t remember how to do it anymore and lost it all my types views when my HD died; if you go to ryan fleury on twitter you might be able find to some examples of he uses it;
Edit: a Type View for zig slices will look something like this type: []? expression array(ptr, len)
To inspect complex types raddbg provides a “raddbg_markup.h” that you can at compile time generate type views for your types, if I not mistaken Odin already creates this for you. In my opinion this is your best bet at getting a proper view at MultiArrayList;
Edit2: You can for instace use this function to create views at comptile time
fn raddbg_type_view(comptime id: []const u8, comptime type_match: []const u8, comptime expr: []const u8) void {
comptime {
_ = @export("type_view: {type: ```" ++ type_match ++ "```, expr: ```" ++ expr ++ "```}", .{
.name = "raddbg_data__" ++ id,
.linkage = .strong,
.section = ".raddbg",
.visibility = .default,
});
}
}
For instance call raddbg_type_view("0", "[]?", "array(ptr, len)"); anywhere in your code, I don’t think zig can generate unique numbers to we use as name
I almost only use array(pointer, len) in the Watch window, to inspect my types. But be aware that when debugging many of your variables will be unwatchable:
- Function args always work
- const declarations like in
const x = foo();are likely to be unwatchable - var declarations works, but they must have unique name inside the function scope for instance having 2
for(0..N) |i| ...loops inside your function will makeimostly likely to be unwatchable, don’t ask me why