Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When debugging with IntelliJ IDEA, what do the different variable colors mean?

Tags:

So when debugging with IntelliJ IDEA, the Variable Window often looks like this:

enter image description here

(the white box is added by me afterwards)

Now i have some variables colored red, others colored blue.

Whats the meaning of the color, what is difference between these colors? I have also noticed red variables with blue fields and the other way around.

I didnt find anything on the web about this.

like image 531
Yalla T. Avatar asked Feb 23 '15 09:02

Yalla T.


People also ask

What does green mean in IntelliJ?

Green is for added, but not commited files. Please check related article about colors: jetbrains.com/help/idea/file-status-highlights.html. – y.bedrov.

How do I inspect a variable in debug mode IntelliJ?

IntelliJ IDEA allows you to inspect variables in a dedicated dialog. This is useful when you need to keep track of some variable (or the object whose reference it holds) and at the same time be able to navigate between frames and threads. Right-click a variable on the Variables tab and select Inspect.

How do I change the color of a variable in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Color Scheme. Use the Scheme list to select a color scheme.

What does debugging do in IntelliJ?

During a debugging session, you launch your program with the debugger attached to it. The purpose of the debugger is to interfere with the program execution and provide you with the information on what's happening under the hood. This facilitates the process of detecting and fixing bugs in your program.


1 Answers

Red is the standard color for variables.

Blue indicates that a variable has changed while you're stepping through the code. If you continue to the next iteration of your loop (assuming offlineNotifications is a Collection), you will see those are the variables manipulated in the current execution of code.

like image 138
acanby Avatar answered Nov 02 '22 01:11

acanby