score:2

as of 2015, this very basix ui woe is not addressed in eclipse: the official bug report is assigned (but not fixed).

fortunately, sven ramuschkat and dirk eismann wrote a plugin for that: the perspective switcher plugin for eclipse / flash builder

the plugin will now automatically switch back from a debug perspective to the previous non-debug perspective as soon as the debug session is terminated

it works on eclipse luna (and above)

installation

download the zip file , uncompress and copy the jar file in your eclipse/plugins folder.

once it's done, you will see a new preference pane.

pref

everything is configured for eclipse to switch back to java perspective if you have a java or properties file opened when the debugging session ends.

score:3

you would need to write eclipse plugin

here i found example how in plugin switch perspective

score:4

i do not think it's possible to have eclipse switch back automatically but you can do it with the click of a button in the top-right of your window

enter image description here

score:23

ctrl + f8, the default shortcut to change views, reduces the pain a bit.

score:27

to complete mark's answer, that option tells eclipse when to switch to the associated perspective upon program suspension - meaning when a breakpoint is hit, it will switch to debug perspective.

switching back to another perspective after you're done debugging has to be:

debug perspective auto closer

automatically opens previous perspective when debugging ends.

behaviors: (configurable: preferences -> debug perspective auto closer)

  1. [default] when all debug launches have terminated, changes to perspective active on first launch
  2. when any debug launch has terminated, changes to perspective active on that launch

java perspective

if you want to avoid it switching to debug in the first place, you can choose "never" as the option (introduced in eclipse 3.2 at the time).

(you can find the given preferences page in run/debug > perspective)

alt text

if you want to switch back in the situation where the debugged program terminates normally (not when you want to stop debugging it yourself), you may hope eclipse figures out that your program terminates normally and switch to a "default" perspective at that time...

however, there is no notion of "default" perspective, so how would eclipse knows which one to switch to ? (the "preferences/perspectives/make default" is only for the "open perspective" dialog, but that may not be the same perspective than the one you actually want to switch back to after a debug)

open perspective

also, should eclipse closes the debug perspective or just changes to a different one ?
what if there is more than one program running -- when one terminates, you might still be interested in debugging the other one, or maybe not.

the point is, the decision about when to change perspective (and what perspective to change to) is not reasonable for the machine to make -- it requires a person knowing what he wants to do next.


Related Query

More Query from same tag