How to copy error out to clipboard from IntelliJ

2019-01-23 12:20发布

I am seeing an error in this yellow box in IntelliJ. How to copy it out to system clipboard?

enter image description here

In Eclipse, there is a good way of doing so. How to do this in IntelliJ?

6条回答
爷、活的狠高调
2楼-- · 2019-01-23 12:38

On the right side of an editor field you can see a red mark that represents your error in the line. If you hover over it, you see the same message tooltip. Quickly move over it and press the mouse button to select the text. It worked in my case.

I have the feeling that this tooltip is a lot easier to select than the tooltip that appears if you hover over the text!

enter image description here

查看更多
再贱就再见
3楼-- · 2019-01-23 12:42

@Vladimir's solution didn't work for me, what I did is just rebuilding the project and copying the error from the message window.

查看更多
看我几分像从前
4楼-- · 2019-01-23 12:45

Long-awaited solution for Linux version: press Ctrl+Alt+left mouse button on the tooltip - and you've got it in your clipboard :)

The solution doesn't seem to be documented anywhere (correct me if I'm wrong), although it works nice.

查看更多
男人必须洒脱
5楼-- · 2019-01-23 12:49

When the tooltip appears - select the text with the mouse, but hold the mouse button down until you press Ctrl+C. This works for me with IntelliJ 13.1 on Ubuntu 14.04.

查看更多
叛逆
6楼-- · 2019-01-23 12:53

The following approach works for me on Windows 8.1 and IDEA 14.1:

Move the caret to the error location. The error message appears on the left side of the status bar below. Right-click the error message - a context menu containing a command "Copy" appears. Select the command "Copy". Voila, the error message is in the clipboard.

Context menu

查看更多
Explosion°爆炸
7楼-- · 2019-01-23 13:01

There isn't an easy way to select the tooltips' text, from my experience, and paste it somewhere else.

Note, however, that depending on what you're analyzing, and the type of error you're getting, the information can be gleaned from the Inspections tool.

Even that won't provide context for you; in this case, the output you're seeing is equivalent to what you'd get if you compiled the Java class. In that case, you'd see the output in the Make window instead.

查看更多
登录 后发表回答