Skip to content

IDE shows wrong line while debugging #2345

@gopakumar-gg

Description

@gopakumar-gg

In the following code, debugging with 'Step Into' from Outer constructor finally reaches line 2 (namespace BeefTest;) instead of line 8 (int* ptr = &x;). Anyway, functionality is working fine. The issue is only with the IDE (Nightly 2025-10-09).

using System;

namespace BeefTest;

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

	public this()
	{
		x = 0;
	}

	public this(ref Self inn)
	{
		x = inn.x;
	}
}

struct Outer
{
	public Inner _inn;

	public this(ref Inner arg)
	{
		_inn.this(ref arg);
	}
}

class Program
{
	public static void Main()
	{
		Inner inn = .();
		Outer outer = .(ref inn);
	}
}
Image 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