This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242033 - While debugging Highlight variables that are null in code window.
Summary: While debugging Highlight variables that are null in code window.
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-18 05:06 UTC by fish_jd
Modified: 2014-02-18 05:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fish_jd 2014-02-18 05:06:51 UTC
I think it would be helpful when debugging to some how mark or highlight variables that are null in the text editor.  It would help with null pointer exceptions as all null variables would be visually identified.   It would be similar to spell checkers that place a red underline under misspelled words, variable that are null need to be fixed just like misspelled words. 

I am sure you will say in response "Why don't you just run the pointer over the variable and then look at the pop up?"  1) I am lazy, as are most programmers.  2) My style is to have very few null variables. 3) NPEs often catch me by surprise when debugging new code.  

The second response will be "Won't that clutter up the interface and code?"  Yes, it will be very cluttered,  especially at the beginning of a constructor.  But null variables are such a high risk of bugs it may be worth it.  A setting to turn it off would be nice too.  

Notice I said while debugging only!  

This would be very helpful in Java as Null pointer errors are prevalent, but PHP, C, C++ and most other languages have the same problem.