Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Eclipse From Stealing Focus when debug starts

I will start by saying that this kind of thing never happens in Linux. Maybe that was due to my particular window manager, but out of convenience, I am back to OS X.

When Eclipse PDT debugging begins, it grabs focus. Often this is slightly convenient, not especially so, but it is often very inconvenient. I am using JIT, which for some reason triggers on PHP fatal errors, but quits immediately. The effect is that focus steals to Eclipse, and repeatedly so given that JavaScript retries the failed call on a timer.

I can't describe the feeling of trying to fix a bug while the focus steals back every 1 second or so.

So how can I either stop eclipse JIT from triggering on a fatal error or stop OS X Eclipse from stealing focus.

I did the steps listed here (http://www.martijndashorst.com/blog/2014/07/02/prevent-eclipse-stealing-focus/), but it did not work.

like image 629
user1122069 Avatar asked Dec 19 '25 04:12

user1122069


2 Answers

When debugging, there is also a case where the eclipse window steals focus when hitting a breakpoint. Because usually an initial breakpoint is set at main() function, it steals focus right after starting debugging and because view refreshes slower it looks as-if the debugging itself is stealing the focus.

Go to Window -> Preferences -> Run/Debug and uncheck option "Activate the workbench when a breakpoint is hit".

enter image description here]1

like image 73
KamilCuk Avatar answered Dec 21 '25 20:12

KamilCuk


Go to Window -> Preferences -> Run/Debug -> Console. Uncheck options:

  1. Show when program writes to standard out
  2. Show when program writes to standard error

enter image description here

like image 43
lax1089 Avatar answered Dec 21 '25 20:12

lax1089



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!