Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No debug information for local variables in "watch" window. #20258

Open
Srekel opened this issue Jun 11, 2024 · 1 comment
Open

No debug information for local variables in "watch" window. #20258

Srekel opened this issue Jun 11, 2024 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior debug-info Debug information of binary generated by Zig is not as expected.
Milestone

Comments

@Srekel
Copy link

Srekel commented Jun 11, 2024

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

I'm on Windows 11 Home.

Please see attached image - this is using the latest (as of today) VS Code, All extensions up to date and using corresponding ZLS version as far as I can tell.

image

Source in text format:

const std = @import("std");
const builtin = @import("builtin");

var hello: i32 = 123;

pub fn main() void {
    var lol: i32 = 1;
    lol += 1;
    hello += 123;
    lol += 1;
    std.log.debug("{}", .{builtin.zig_version});
}

Here is my tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "zig build  --summary failures",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ],
            "presentation": {
                "clear": true
            }
        },
    ]
}

and here is launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/zig-out/bin/zigtesting.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "preLaunchTask": "build"
        },
    ]
}

Related: #15095

Expected Behavior

I expect to be able to see all variables in the local and any upper scopes in both Watch and Locals.

I'm going to reiterate that I think it'd be great if we could have a "Debugging" github label for tracking issues like this one.

@Srekel Srekel added the bug Observed behavior contradicts documented or intended behavior label Jun 11, 2024
@zhylmzr
Copy link
Contributor

zhylmzr commented Jun 14, 2024

I am using CodeLLDB for debugging on macOS, and everything is functioning normally.
SCR-20240614-niom

@Vexu Vexu added the debug-info Debug information of binary generated by Zig is not as expected. label Jun 22, 2024
@Vexu Vexu added this to the 0.15.0 milestone Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior debug-info Debug information of binary generated by Zig is not as expected.
Projects
None yet
Development

No branches or pull requests

3 participants