Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA Debugger does not show null element in a list

I have a list in which the first element is null. IntelliJ debugger correctly shows the list size as 5, but it shows only 1,2,3,4 elements. It would be nice to see that element with the index 0 is null (it took me some time to figure out my problems while debugging because it did not show that). Is it possible to force IntelliJ to show this?

Here is a screenshot, where the size is 5 and the elements shown are only 1-4 because the first element is null:

enter image description here

like image 709
jgr Avatar asked Jun 08 '17 08:06

jgr


People also ask

Why my debugger is not working in Intellij?

If the code is outdated, or the versions (the source code and the compiled class) mismatch in any way, it can happen that the debugged is giving the IDE information to show a certain line, but that information is not correct giving the current source code, which might cause what appears to be the debugged "jumping" ...

How do I show debug variables in Intellij?

You can click on the Run icon in the gutter area and select the Debug option. You can invoke context actions on the class or main method by using Alt+Enter and choose the Debug action. You can also start it from the Run menu, or by pressing Shift F9.

How do I keep debug points in Intellij?

To do this, go to Settings/Preferences | Build, Execution, Deployment | Debugger and select Drag to the editor or click with middle mouse button. Clicking a breakpoint will then enable or disable it.

How does debugger in Intellij work?

The debugger is a powerful tool, which lets you find bugs a lot faster by providing an insight into the internal operations of a program. This is possible by pausing the execution and analyzing the state of the program by thorough examination of variables and how they are changed line by line.


1 Answers

Null array elements are hidden by default, you can disable it here:

hide null

like image 116
CrazyCoder Avatar answered Oct 03 '22 07:10

CrazyCoder