Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I copy error message from intellij idea?

When I'm writing code in intellij and make an errors, it highlists code with erros, when I put mouse over it, it displays detailed error message. The problem is I can't copy it. When i'm moving mouse over pop-up baloon message and start selecting the message, baloon disappears. In eclipse there is a feature 'focus' on F2 with allows you to focus it on pop-up so it becames a modal window and won't disappear when you move mouse away. is there such feature in intellij idea or is there any other way to copy error message?

EDIT: I just figured out that I need to:

  1. very carefully move mouse down to baloon,
  2. very carefully move mouse to the left side, but only to the left side of the text, not baloon
  3. press left mouse button, then very carefully move mouse to the right side of text, not baloon
  4. without releasing left mouse button press ctrl+c.

Come on! that's really annoying, is there a 'focus' feature feature like F2 in Eclipse?

EDIT2: another way of doing this:

  1. carefully move mouse down to baloon message
  2. hold left mouse button
  3. without releasing left mouse button press ctrl and then really fast A then C

It'll make baloon message to go away, but if you're lucky enough you'll manage to select all text from baloon and copy it. With certain practice it's really faster then method #1.

Still no "normal" way to do this.

I found that if I compile class, I can get error messages, but they can be completely different and if my class doesn't compile, I won't get my error message at all.

like image 530
dhblah Avatar asked Oct 16 '13 09:10

dhblah


People also ask

How do I get to the error line in IntelliJ?

Navigate between errors or warnings To jump to the next or previous found issue in your code, press F2 or Shift+F2 respectively. Alternatively, from the main menu, select Navigate | Next / Previous Highlighted Error. IntelliJ IDEA places the caret immediately before the code issue.

How do I see errors and warnings in IntelliJ?

Navigate to detected problems in the widget or by pressing F2 or Shift+F2 accordingly. By default, the IDE will navigate you to problems according to their severity: errors > warnings > weak warnings > server problems > typos.

How do I resolve an error in IntelliJ?

Apply fixes in the Problems tool window Click a problem to display inspection details on the right. icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.


2 Answers

UPDATE: It works via Alt+Click in the current IDE versions, but there are still several usability issues: it's not discoverable, doesn't work for all the pop-ups and may copy additional text/keyboard shortcut symbols. There is also a request to make it more straightforward by allowing to copy only selected text via Ctrl+C.


Original answer:

Please vote for this issue to get it fixed.

like image 114
CrazyCoder Avatar answered Sep 17 '22 19:09

CrazyCoder


I can't select text from the error message tooltip at all on Mac and IntelliJ CE 2018, but someone in the linked bug ticket pointed out that Alt + Mouse Click copies the text to the clipboard (meaning you can then paste and get the text) and that worked for me.

like image 26
Adair Avatar answered Sep 17 '22 19:09

Adair