Skip to content

Debugger Watch window doesn't recognize variables below 'using struct' block. #2347

@gopakumar-gg

Description

@gopakumar-gg

Watch window is not able to see ptr.

using System;

namespace BeefTest;

struct Inner
{
	using struct
	{
		public int x = ?;
	}wrapper;
	
	int* ptr = &x;

	public this()
	{
		x = 1;
	}

	public void Modify(int val)
	{
		*ptr = val;
	}

	public int GetVal() => x;
}

class Program
{
	public static void Main()
	{
		Inner inn = .();
		inn.Modify(7);
		Console.WriteLine($"wrapper x = {inn.GetVal()}"); // works fine.
	}
}
Image

Metadata

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