Compilation errors not always easy to spot - line number should be displayed somewhere

Answered

HI

sometimes I get compilation errors in a file and cannot spot the line. 

e.g. cannot spot the red line near the scroll bar. either because of file size or because there are many warnings.

I only see an error in the at the top right of the file scroll bar.

Is there a way to view the error line somewhere?  a console or event log?

It is possible to add details to that analysis window? 


 

 

// using IDEA 2017.1.4 (community edition) / linux redhat

0
12 comments

You should see the error in the Problems view or in the Messages view, check https://www.jetbrains.com/help/idea/2017.1/problems-tool-window.html.

1

Make project automatically: check box does not exists under Compiler or Java compiler settings

  • anyway, code is already compiled automatically when I save and still cannot see the line
  •  there is not Problem window appearing as described in the link you provided when I save the file: "The Problems tool window appears only if auto make option is enabled and your code contains a compilation error."  

I cannot find any View for Problems view or Messages view:

  • So where do you get access to Problems view or Messages view?
  • I only have Event log and it contains test result.

 

1

Please attach the full screenshot of the editor window. What is the language of the problematic file?

Are you sure you don't have this option?

0

I have - like I told before: it compiles when I save but does no Message or Problems

 

 

 

0

You have this option disabled:

0

FYI there is a problem on the scrollbar on the right

  • if the line with error is on the same line as find test -> find text will appear on the scrollbar in green and hide error
  • if the line with error is on the same line as a method I selected in the class ->selected text will appear on the scrollbar in purple and hide error
  • so if nothing is in the find box and no text/method is highlighted - Working




 

 

0

I enabled the option and still same behavior there are no Problem window or Message window appearing anywhere

 

0

Is the error in syntax? Is it reported by the compiler on rebuild?

If the error is reported by the inspection, run Analyze | Inspect Code to get the results list.

0

I simply remove a semi colon and save the file. I don't do rebuild often - we have 500K line of codes

it works with Analyze. I can find the line with error.

 

So my problem is with the UI - as I described 2 post ago - depending on what is selected in IDEA, the scroll back hides the red error line 

thanks anyway

 

 

0

Thanks for the information. Please vote for https://youtrack.jetbrains.com/issue/IDEA-41960.

Build | Build should display the error as well if it's in syntax and the file cannot be compiled.

1

The OP asked a few times how to access  the Problems view and/or Messages view. It was not clear to me from above gut the helps says that "This tool window is activated automatically if the Make project automatically option is enabled in Compiler settings. "

0

The Messages tool window will be shown if there are any messages (infos/errors/warnings) on the project build.

0

Please sign in to leave a comment.