IntelliJ Environment Variables - intellij-idea

Trying to understand why the environment variable is red here but, the other environment variables a normal white color. What does the red indicate?

The color indicates that you've modified this environment variable (it's different from the system default).

Related

Any solution to having to scroll back up to the top of a program all the time to check variables declared?

I am programming in Pascal (compiling with the Free Pascal IDE) but I imagine the following issue could be in all programming languages, whether you have to declare variables or not.
In Pascal you have to declare your variables before you can use them. They can only be declared at the top of a function/procedure or, in the case of global variables, at top of the main program.
As my program got longer over the past year and more and more variables were declared, I have had to scroll back up all the time to check which variables I have declared in order to use them in a function or main part of the program.
Is there any solution to not have to scroll back up all the time?
Putting variables in a separate unit file and having the file opened next to the main program file is the only thing I can think of, but at this stage I have too many functions and classes to shift everything around that way. Too much rework of the code would have to be done.
In Lazarus, the freeware and excellent IDE for FPC[1], there is a simple way to do this:
Place the mouse over a variable
If the variable has been declared, the IDE will visually mark it
If it is marked, single-clicking the variable will take you straight to where
it is declared.
More generally, when you hover the mouse over a variable, the IDE will change its background color to something like light grey[2], including any other occurrences of it which are on-screen
at the time, so by itself this is sufficient to locate the variable's declaration site if it happens to be on-screen, as it often is if the variable is a local.
[1] I don't know why anyone would use Notepad++ or another IDE for FPC considering
how good Lazarus is.
[2] The top and bottom pixel rows of the changed background color are drawn darker than the others, which makes it look rather like (wearing my spectacles) the variable name is underlined.
Delphi IDE although a paid solution offers free community packages for students and such. i had a great time using it for my college assignments. its more user friendly as I had a lot of trouble navigating Lazarus. on delph I there is a side-panel that shows you all your stated variables,constants,uses,procedures and more.

PhpStorm Newcomer Here - Variables Different Colours?

I have only just come to PhpStorm and I'm a little stumped at some settings.
I can not understand why one of my variables have a different colour to the rest of them. However I can not work out why this is happening. Any help? I expect the variable to be grey.
First of all some description for your colors:
grey (with underwave effect) means that parameter/variable is unused.
that dark red color means that parameter is used (so normal color for parameter)
Now ... you are using custom color scheme that is NOT up to date (not meant to be used with this IDE version). Basically -- that color scheme does not have color defined for that specific style and IDE uses default one (color of a parent style in appropriate styles inheritance hierarchy).
To fix that you will have to adjust your Color Scheme:
Settings/Preferences | Editor | Color Scheme | PHP
The rest -- depends on the element.
for function parameter it should be Functions and Methods | Parameter
but it could also be something else -- cannot say for sure without having your actual color scheme here on my computer.
I am assuming the red color is indicating that the variable is used in the compact method. To verify remove it from using it in the compact method and it should turn grey like your other method parameters.
If you don't like this, you can either change the color scheme or overwrite it.

How to add watch for dashed variable names in Google Chrome Debugger?

How can we easily add dashed variable names (they are written in Livescript) into watch window in Chrome (Chromium) debugger? Right-click adds the variable as is, so it can not be recognized as a variable:

How to change the active tab header's color in IntelliJ 14.1.4?

I'm using a dark theme in IntelliJ 14, the problem is that I have difficulties in distinguish the active tab, because its header's background is not different than the other tabs I have opened (or it is, but very little). I looked all over the place for a method to change the color of the active tab header's background, no luck so far.
Please help?
Please note that this setting has worked for IntelliJ 14 back then, but is no longer applicable for newer versions
Find the comments below for plugins as a great alternative (Material Theme UI, Active IntelliJ Tab Highlighter)
Although, if you are still using IntelliJ 14:
Under File \ Settings \ Appearance & Behavior \ File Colors,
turn off "Use in Editor Tabs", as test tabs background are
dark-green by default, which is similar to the dark-grey non-selected
tabs.
After that, optionally you can set the colors under:
File \ Settings \ Editor \ Colors & Fonts \ File Status
and change the Foreground color of "Modified" status.
Now it will highlight the modified files (in version control).
To me, the solution turned out to be a plugin implementation:
https://github.com/tobszarny/ActiveTabHighlighterPlugin
Feel free to fork it for alteration, or use as is. Now with color customization and with IntelliJ platform IDE's support, such as PhpStorm or RubyMine.
Now also in the plugins repository, for auto update whenever new version is made.
If you are using the latest intellij you can make this customisation through the menu, see the screenshot for the breadcrumb. This is from version: 2020.1.1 Ultimate Edition
The Material Theme UI allows additional settings
like color and thickness of the line below the active tab (pink in the screenshot)
Whilst this solution does not change the colour between tabs, it does change all tab colours so that you can distinguish it from the background tab bar, which in my case was enough. It may still help others.
I used File Colors. The image below shows what I did. Set scope to All and choose the Custom colour (white):
I am using Darcula theme with a background image (simple plain black image). I tried the excellent plugin suggested by Tomasz O. https://stackoverflow.com/users/2479048/tomasz-o, but it did not work. Later on, I realized that when I decreased the opacity of background image, I was actually able to distinguish the color change made by the plugin. I wonder why Android Studio does not provide a convenient setting for changing active tab header color. I'm on AS 3.4.2 already!
Intellij 2019.1 has options for customization.
Besides, it has new themes for different shades of color you can choose from.

NetBeans debugging variable values

I am debugging in NetBeans IDE, where can I see assigned variables and their values?
While you're in the debugger go Window -> Debugger -> Variables
You can also use ALT+SHIFT+1 to bring up variable viewer.
Generally, the pane underneath the code has some tabs - and one of them will say 'Variables'. Click on that tab and you will see variables and their values. You need to be actually running a debug session before the variables tab is available.
For this to show all local variables you need to have the line:
xdebug.show_local_vars=1
in your xdebug.ini file. Don't forget to restart Apache if you add that line.
If you are not seeing all local variables then you may have hit the problem where your version of the module file (xdebug.so) has a bug. This is the case currently for Ubuntu 10.04.
To fix this you need to compile a newer version of the xdebug.so file. Follow the instructions at http://xdebug.org/wizard.php to get your new file which should replace your current xdebug.so file.
There exists another solution that is
Press Ctrl+F9 to display Evaluate Expression Panel/Tab
Enter variable name in Evaluate Expression Panel/Tab
Press Ctrl+Enter (or arrow icon at right of Evaluate Expression Panel/Tab
The variable's value is then displayed in Variables Panel just below (on my PC) Evaluate Expression Panel/Tab.
You can also use this solution to display EXPRESSION and not only VARIABLE !
Example: (String sSheetData is a String variable that contains a very big string)
sSheetData.substring(4000,4200);
StringTools.Right(sSheetData,100);
StringTools.Mid(sSheetData,4000,200);
This is also possible using New Watch callable using contextual menu.
But this is not as easy as using Immediate Windows on Microsoft Visual Studio :-)