Skip to content

u8 local variable while debugging shows as string #381

Open
@redexp

Description

Good day

Example code

const std = @import("std");
const expect = std.testing.expect;

test "while with continue expression" {
    var sum: u8 = 0;
    var i: u8 = 1;
    while (i <= 10) : (i += 1) {
        sum += i;
        std.debug.print("{d}", .{i});
    }
    try expect(sum == 55);
}

on step 4 debug toolbar shows variables like this

i = '\x04'
sum = '\n'

when should be

i = 4
sum = 10

vscode-zig version

Identifier: ziglang.vscode-zig
Version: 0.6.3
Last Updated: 2025-01-17, 17:59:21

VScode version

Version: 1.96.4
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Linux x64 6.8.0-51-generic snap

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions