Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #434245 +++ See also bug 434245 comment 6. Steps below also reproduce in 64 bit Eclipse SDK builds with a Java Application launch configuration. (Dobrin Alexiev from bug 434245 comment #8) > Here are the steps to reproduce the issue: > On Windows 7 download and unzip Eclipse “Standard 4.4 RC3 Windows 32 bit” > from the site: http://www.eclipse.org/downloads/index-developer.php?Luna > Start eclipse.exe > Create a new plugin project. > Open and modify of the java source files. Do not save it. > Open the “Debug Configuration” dialog. > Select “Eclipse Application” on the left pane and create a new instance of > it. > Select the new instance and click on the “Debug” button at the bottom of the > dialog. > When prompted with the “Save and Launch” dialog say Cancel. > Switch to “debug” perspective. See how there is one node in the “Debug > View”. > The “Remove All” button and most of the context menu for that launch are > disabled. > Click on the Debug drop down and try launching the same launch configuration > few more times, but make sure you do not save the file. > See how the debug view accumulates launches that are not useful for anything > and I don’t know how to get rid of them. > I was able to remove the launch configuration from the Debug Configuration > dialog, but all items still remain the debug view. They change to <unknown> > after I’ve deleted their launch configuration.
Thank you, Markus, for prioritizing this bug for 4.4.1. According to the schedule site: http://wiki.eclipse.org/Luna/Simultaneous_Release_Plan the SR1 release will be at end of September. So the 4.4 release will be with this bug for the first three months. I don’t know how many people will see it and be puzzled by it, or if there is any chance fixing it in RC4 at this time. I also don’t know if will cause issues other than the described here, or affect more severely other debuggers. For sure it did our debugger, which launcher has overwritten preLaunchCheck(). In any case I just wanted to note that it has been introduced about three weeks ago, and I think the code change is just adding the launch in the collection earlier, before considering that result from preLaunchCheck(). I just wonder if undoing that change will give the users better Eclipse 4.4 experience for the first three months after the release. Regards Dobrin
(In reply to Markus Keller from comment #0) > +++ This bug was initially created as a clone of Bug #434245 +++ > > See also bug 434245 comment 6. > > Steps below also reproduce in 64 bit Eclipse SDK builds with a Java > Application launch configuration. > > (Dobrin Alexiev from bug 434245 comment #8) > > Here are the steps to reproduce the issue: > > On Windows 7 download and unzip Eclipse “Standard 4.4 RC3 Windows 32 bit” > > from the site: http://www.eclipse.org/downloads/index-developer.php?Luna > > Start eclipse.exe > > Create a new plugin project. > > Open and modify of the java source files. Do not save it. > > Open the “Debug Configuration” dialog. > > Select “Eclipse Application” on the left pane and create a new instance of > > it. > > Select the new instance and click on the “Debug” button at the bottom of the > > dialog. > > When prompted with the “Save and Launch” dialog say Cancel. > > Switch to “debug” perspective. See how there is one node in the “Debug > > View”. > > The “Remove All” button and most of the context menu for that launch are > > disabled. > > Click on the Debug drop down and try launching the same launch configuration > > few more times, but make sure you do not save the file. > > See how the debug view accumulates launches that are not useful for anything > > and I don’t know how to get rid of them. > > I was able to remove the launch configuration from the Debug Configuration > > dialog, but all items still remain the debug view. They change to <unknown> > > after I’ve deleted their launch configuration. After following the steps I get only one Launch configuration. I am not getting multiple launch configuration!! And I am able to delete the newly added configuration and I don't get a "unknown" entry . Just to make sure that there is no other debug plugin in your workspace which contributes to launch dialog and actions?
(In reply to Sarika Sinha from comment #2) Everything is fine with the launch configuration. The problem are the stale launches shown in the *Debug* view.
Created attachment 244225 [details] Screenshot
Thanks Markus for the clarification.
Created attachment 244467 [details] Patch to remove the cancelled launches from Debug View Patch to remove the cancelled launches from Debug View. Currently only terminated launches were removed, now additional method to remove the cancelled launches has been added while adding a new launch.
This patch will only work with debuggers that are based on the standard debug model. Many debuggers are not like that. Most CDT debuggers are based on the flexible debug hierarchy and the bug will not be fixed for them. Also I still think it is a break in the promise that when preLaunchCheck is called the new launch is already added in the collection. Do we need fix for “Bug 434245 - Failed to launch run / debug configurations are not added to the "Run/Debug History" https://bugs.eclipse.org/bugs/show_bug.cgi?id=434245 that does not break that promise. I found one issues, but I wander if there are other places in the code the assumes the launch is not yet in the collection?
Created attachment 245594 [details] Patch to remove the launch if pre check or project build fails This patch removes the launch if precheck of file or build of project fails. Removal of launch does not remove the entry from history.
Thank you, Sarika! With this patch on top of the other patches the behavior seems OK under different conditions. I'll continue testing in the next few days.
Pushed the patch to master: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=4f500655f939aceeb1b96a11aec968af7bce1501 create unit tests for the fix: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=5c825eba98cb4bdc1e263a8f48592971484b2623
Pushed fix to 4.4.1: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?h=R4_4_maintenance&id=10f8d7739812769e3f98609c760a97914d9e0985 and updated the bundle version: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?h=R4_4_maintenance&id=f2f19a8662597740e86fbd72376f28946c10af84
Verified using: Eclipse SDK Version: Mars (4.5) Build id: I20140806-2000 & Version: Luna SR1 (4.4.1) Build id: M20140806-0900
I also noticed another discrepancy from the previous Eclipse version. When the launch is added to the launch manager before preLaunchCheck is called ( LaunchConfiguration.java - around line 830 ) the perspective switch will take effect. After that if preLaunchCheck returns false the perspective will remain the Debug perspective. This is a change from previous Eclipse that our users found confusing. Is it possible to fix this this for Eclipse 4.4.1?
(In reply to Dobrin Alexiev from comment #13) Can you provide the steps which changes the perspective ?
You have to set "Preferences > Run/Debug > Perspectives > Open the associated perspective when launching" to "Always". Then launch with an unsaved editor. I guess the perspective switching code needs to be moved from the pre-launch to the actual launch stage. That would also avoid the stacked dialogs if that preference is set to "Prompt". Dobrin: This bug is Fixed/Verified, and it's too late for 4.4.1. Please open a new bug.
Thank you. Here is the new bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=443960