Beef icon indicating copy to clipboard operation
Beef copied to clipboard

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

Open gopakumar-gg opened this issue 2 months ago • 0 comments

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

gopakumar-gg avatar Oct 22 '25 08:10 gopakumar-gg