dotnet / dotnet/roslyn

The IDE should not allow setting breakpoints on interface property getters and setters

Open
#80,903 0 comments 0 reactions 0 assignees View on GitHub
Area-IDE
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

## Summary
Breakpoints on interface property getter and setter declarations can never be hit, so it shouldn't be allowed to set them in the first place

## Background and Motivation
I wanted to break into the invocation of a properties' setter, but was in the wrong file (the interface, not the implementation, putting a breakpoint there (using F9 in VS). Then I ran the application but was confused why my breakpoint was never hit.

## Proposed Feature
It should not be allowed to set breakpoints on get; or set; declarations of interface properties.

## Alternative Designs
alternatively, when I set a breakpoint at an interface property accessor, the debugger should at runtime break at all matching property accessors of all interface implementations - but i think this is soooo much more work...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.