Add ability to set a break point on a constructor declared by a `union` declaration
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
Given a `union` declaration ```union U (int, bool);```, for `int` and `bool` we create a constructor. For each of them a sequence point pointing to the corresponding type syntax is added at the end of the constructor's body (this is very similar to what we do for record constructors).
The idea is that a user should be able to set a break point for the constructors by using the corresponding type syntax. This doesn't work at the moment. While stepping, debugger stops at the location, but there is no way to set a break point at it
From @tmat:
> Seems similar to records. Definitely non-trivial. Needs updates in multiple places in IDE (breakpoint placement and EnC).
Contributor guide
Research direction
Start by comparing how record constructors expose sequence points and breakpoint placement with the equivalent union-constructor behavior described here. Trace the IDE areas responsible for breakpoint placement and Edit and Continue (EnC), then verify that a breakpoint can be set on each constructor's corresponding type syntax and that stepping still reaches it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100