Skip to content

EnC: Multi-line active statement span not calculated properly #58179

@tmat

Description

@tmat

Version Used:
Version 17.1.0 Preview 3.0 [32005.40.main]

Steps to Reproduce:

public class C
{
    static void Main()
    {
        F(() =>
        {
            Console.WriteLine(1); // breakpoint
            Console.WriteLine(1);
            Console.WriteLine(1);
            Console.WriteLine(1);
            Console.WriteLine(1);
            Console.WriteLine(1);
            Console.WriteLine(1);
        });
    }

    static void F(Action a)
    {
        a();
    }
}
  1. Set breakpoint as indicated, F5
  2. Add a few more Console.WriteLine(1); lines.
  3. Continue

Expected Behavior:

The inner active span covers the entire call F(() => { ... });.

Actual Behavior:

image

Similar issue happens when whitespace is changed in the active statements (e.g. it's indented):
image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions