125

Is there a way to make IntelliJ mark error locations continuously for the files you are working on in the similar manner as Eclipse does? At the moment I need to make the project which lists all the errors in the message panel, but even then I cannot navigate to them using the editor panel. I would like to have simple dots/markers which would point to error/warning locations.

4
  • 1
    That happens by default in Intellij. Are you sure it's identifying your source files correctly ? Commented Aug 2, 2012 at 10:11
  • 2
    Any chance you have the "Power save mode" enabled by mistake?
    – Vic
    Commented Aug 2, 2012 at 10:17
  • I can see warnings but not errors...\
    – Bober02
    Commented Aug 2, 2012 at 10:21
  • I am using a different color scheme. Is there a place to edit that behaviour, as mine is simply grey and I cannot see it on the highlight bar
    – Bober02
    Commented Aug 2, 2012 at 10:28

12 Answers 12

98

IntelliJ IDEA detects errors and warnings in the current file on the fly (unless Power Save Mode is activated in the File menu).

Errors in other files and in the project view will be shown after Build | Make and listed in the Messages tool window.

For Bazel users: Project errors will show on Bazel Problems tool window after running Compile Project (Ctrl/Cmd+F9)

To navigate between errors use Navigate | Next Highlighted Error (F2) / Previous Highlighted Error (Shift+F2).

Error Stripe Mark color can be changed here:

error stripe mark

5
  • 9
    "Errors in other files and in the project view will be shown after Build | Make and listed in the Messages tool window." Unfortunately the output in the messages window doesn't tell you where the error is, it just tells you the compilation failed, and to see compiler error output for details. Is there any way to make it show the compiler error output from within the IDE instead of running from the command line? Also it would be great if files with a problem could be marked somehow in the file tree so you could see files which had errors even when they weren't open. Commented May 20, 2013 at 20:07
  • In my case, the "Error stripe mark" box under Settings | Editor | Colors & Fonts | General | Errors and Warnings | Error was unchecked. Checking this box fixed the issue. Commented Oct 17, 2016 at 16:29
  • 1
    Is there somewhere a list with this errors? (a list with the errors I can jump to by pressing F2
    – Auroratic
    Commented Aug 10, 2017 at 10:11
  • For me (with AndroidStudio 3.1.2) errors are shown in View > Tool Windows > Build after Build > Rebuild Project but files are still not marked. I've opened a question for this: stackoverflow.com/q/49835192/2532583
    – yasd
    Commented Apr 26, 2018 at 15:20
  • @markthegrea please submit a ticket to support with more details.
    – CrazyCoder
    Commented Apr 12, 2019 at 17:50
38

For those who even yet have the problem, try enabling "Build project automatically" in the Java compiler settings and see if that makes a difference as it worked for me.

1
  • 1
    Thanks! Although this is not what the OP strictly asked, this makes IntelliJ to show the list of errors as most IDEs do. Commented Aug 22, 2017 at 22:36
29

I ran into the problem of not having set my sources root folder (project window--right click folder, mark directory as > sources root). If you don't set this IDEA doesn't parse the file.

18

For IntelliJ 2017:

Use "Problem" tool window to see all errors. This window appears in bottom/side tabs when you enable "automatic" build/make as mentioned by @pavan above (https://stackoverflow.com/a/45556424/828062).

enter image description here

To access this Problems panel, you must set your project to build automatically. Check the box for Preferences/Settings > Build, Execution, Deployment > Compiler > Build project automatically.

screenshot of <code>Preferences</code>/<code>Settings</code> > <code>Build, Execution, Deployment</code> > <code>Compiler</code> > <code>Build project automatically</code>

2
  • 9
    No such menu item in IntelliJ 2019.1. Commented Feb 19, 2019 at 3:07
  • 2
    @BasilBourque you need to check the Build Project Automatically checkbox under the Preferences -> Compiler and restart IntelliJ 2019.1 Commented Jun 11, 2019 at 18:07
10

Frankly the errors are really hard to see, especially if only one character is "underwaved" in a sea of Java code. I used the instructions above to make the background an orangey-red color and things are much more obvious.

7

In IntelliJ Idea 2019 you can find scope "Problems" under the "Project" view. Default scope is "Project".

"Problems" scope

1
  • 2
    This only shows the problems that are already found. Does NOT analyze files to check if there are any problems.
    – DFSFOT
    Commented Apr 12, 2019 at 12:01
6

Besides, you can choose going to next error only (ignore warning) by:

  1. Right click the Validation Side Bar.
  2. On the context menu, choose the Go to high priority problems only

it works for Intellij Idea 12

0
5

In my case, I unknowingly unchecked 'Error Stripe Mark' option (Idea 2018.2: Settings > Editor > Color Scheme > General and expand `Error and Warnings' & click 'Error').

Fix is to check 'Error Stripe Mark' option of 'Error' (as highlighted in the below image). Now you will see the error marks in scrollbar area.

enter image description here

1

In my case, IntelliJ was simply in power safe mode

1

Do you have a yellow icon like this [_] at the bottom of the main window? It is a "type-aware highlighting" switch which could be disabled accidentally. You should re-enable it by clicking on the icon.

0

In the intellij hit ctrl+alt+shift+s and go to global libraries and click on plus icon to add the java libraries this will solve your problem. now you will see the errors coming up

enter image description here

-1

This is the solution I found:

  1. Open IntelliJ Setting (Crtl + Shift + A);
  2. Click in "Editor";
  3. Click in "Color Scheme" + the Programming Language (inside "Color Scheme");Select ColorScheme + Programming Language
  4. Select "Analysis Error";
  5. Select "Error stripe mark" + Add the Color desiredThe 04 Steps described above
1
  • This just sets how errors and warnings will be displayed, but it does not automatically buil d the project to have all errors/warnings marked in their corresponding files/lines, like Eclipse does and what is being asked. Commented Feb 21, 2022 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.