Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.NullReferenceException should say which reference is null #72545

Closed
vsfeedback opened this issue Mar 14, 2024 · 1 comment
Closed

System.NullReferenceException should say which reference is null #72545

vsfeedback opened this issue Mar 14, 2024 · 1 comment
Labels
Area-IDE Resolution-External The behavior lies outside the functionality covered by this repository untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


If you have a long line of code that does a lot of things and you get a System.NullReferenceException on that line, VS highlights the whole line and doesn't give any further information as to which reference is null, which can be hard to figure out.

It would be nice if it could say that specifically "import.Fields" is null


Original Comments

John Munro on 2/23/2024, 02:36 PM:

(private comment, text removed)

Feedback Bot on 2/26/2024, 02:27 AM:

(private comment, text removed)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 14, 2024
@dibarbet
Copy link
Member

Closing - this is already a VS debugger feature:
image

Runtime support in the actual exception message is covered by this issue - dotnet/runtime#3858

@dibarbet dibarbet added Resolution-External The behavior lies outside the functionality covered by this repository Resolution-Not Applicable The issue is not relevant to code in this repo and is not an external issue. and removed Resolution-Not Applicable The issue is not relevant to code in this repo and is not an external issue. labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Resolution-External The behavior lies outside the functionality covered by this repository untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants