Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 83263

Summary: stopping at breakpoint steals UI focus, with destructive effects
Product: [Eclipse Project] Platform Reporter: Andrew D. Stadler <stadler>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: david.balazic, Michael_Rennie
Version: 3.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andrew D. Stadler CLA 2005-01-19 18:24:10 EST
Using eclipse 3.0.1, CDT 2.0.2, on FC3, with Gnome 2.8.

When eclipse hits a breakpoint (including stopping at the first line of main()),
it seems to activate the eclipse platform window and make it the focus.  This
has two extremely irritating side-effects.

(1)  If I was typing in another window, the change of focus causes my keystrokes
to begin EDITING THE FILE UNDER DEBUG.  This can insert, change, or even delete
lines of text from the source file.  The source file is now dirty and forces a
recompile.  If the file was under team management and locked, it is
automatically checked out!  These results are all far too destructive.

(2)  If I was clicked over to another virtual workspace/desktop, eclipse "jumps"
into that virtual desktop.  This means that before I can do much else, I often
need to click the upper-left-corner icon and move eclipse back to the workspace
where I want to keep it.

Perhaps some of these are gnome interaction subtleties, but whatever the cause,
I claim that they are bad behavior.  

Now, you might say, "it's a preference, just turn it off".  And that's true....
 But I claim it's a poor default preference (due to its destructive behavior). 
And also, turning it off solves the destructive problem, but there doesn't seem
to be another alternative e.g. beep, or flash the menubar, or whatever....  So I
also am filing this bug to request an alternative form of notification.

To summarize this overly long bug report:

1.  default behavior is destructive and should be changed.
2.  alternative non-destructive notification of breakpoint should be provided
Comment 1 Darin Wright CLA 2005-01-31 09:42:27 EST
The default breakpoint behavior activates the window as noted. The default 
setting for this has been the same since the "beginning of time" (Eclipse), as 
this is what most users want - i.e. notification that an event requiring their 
attention has ocurred. Those who decide they do not want this behavior are 
able to change the preference (as noted).

The only platform independent option we have to notifiy the user in a 
reasonable manner is to use SWT's support to "forceActive" a shell. This has 
different results on different platforms - i.e. bringing a window to the front 
vs activating/flashing it in a list of open windows.

Do not plan to change.
Comment 2 David Balažic CLA 2007-11-08 10:11:45 EST
> Now, you might say, "it's a preference, just turn it off".  And that's true....

Really !? Where is that option ?
Comment 3 Michael Rennie CLA 2007-11-08 10:32:10 EST
The options in question are in the Preferences dialog on the Run/Debug page. The two specific ones you want are:

1. Activate the workbench when a breakpoint is hit
2. Activate the debug view when a breakpoint is hit