sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Possible Bug: "Boot Dashboard" view opens the "dialog window configurations" as Debug mode

Open manueljordan opened this issue 2 years ago • 6 comments

For:

Spring Tool Suite 4 

Version: 4.17.2.RELEASE
Build Id: 202301310704
Revision: 4c43862ec9482cb5c289960e5514998e59d2f1fe

For any Spring Boot project, if is executed the app through:

  • Right click -> Run As -> Spring Boot App

The app runs as expected. And if is need it to do some editions, is enough do

  • Top menu -> Run ->Run As Configurations

The dialog window opened has the title with the name: Run Configurations

If is used the Boot Dashboard view, and is selected the same Spring Boot project, and through the top menu is done click in the pencil icon it opens the same dialog window but it has the title with the name: Debug Configurations.

Observe here that now is Debug Configurations and not Run Configurations. Is it expected?

Of course, if is used

  • Top Menu -> Run

Then is possible open the same dialog window but according if is selected either Run Configurations... or Debug Configurations...

manueljordan avatar Jul 25 '23 17:07 manueljordan

I observe the same behavior, but I am wondering whether it makes a difference or not. The launch configurations that appear in the launch dialog are all the same, including the same editing options, etc. So would you prefer a title called Run Configurations instead of Debug Configurations and if so, why?

We could, of course, have two pencil-like icons in the dashboard to either open the Run Configurations dialog or the Debug Configurations dialog, but what would be the difference?

The idea behind the pencil icon is really only to configure and modify the launch configurations, if needed. It is not meant to be the place to actually launch the app in run or debug mode. For that purpose, you don't even need to open the launch config dialog, but you can use the run/debug buttons in the dashboard directly - which we assume is the standard case.

WDYT?

martinlippert avatar Jul 28 '23 12:07 martinlippert

Sorry for the delay

but I am wondering whether it makes a difference or not

The point is run the app, right? so why confuse the developer with the "debug" term?

The launch configurations that appear in the launch dialog are all the same, including the same editing options, etc

I understand. But the purpose to use the Boot Dashboard view, it about execution, is mostly in mode run. Am I correct? Furthermore, take in consideration that the perspective is keep it in run mode and non-debug mode

So would you prefer a title called Run Configurations instead of Debug Configurations and if so, why?

At a first glance yes. But if the perspective is changed to debug mode, therefore the title should be Debug Configurations. Here has more sense to define the title of the dialog window according with the perspective, java or debug. WDYT

We could, of course, have two pencil-like icons in the dashboard to either open the Run Configurations dialog or the Debug Configurations dialog, but what would be the difference?

It would be more confuse for the developer - I think the perspective applied should define the correct title

The idea behind the pencil icon is really only to configure and modify the launch configurations, if needed

Agree

It is not meant to be the place to actually launch the app in run or debug mode

Agree

For that purpose, you don't even need to open the launch config dialog, but you can use the run/debug buttons in the dashboard directly - which we assume is the standard case

Agree

Even if you are not agree with the idea to define the title according with the perspective - the current Boot Dashboard view practically always execute the app as run mode.

Note I did not test it, but if the debug perspective is currently activated: Does the Boot Dashboard appear as a default view to be selected? Such as the Console view when the java perspective is currently activated

manueljordan avatar Aug 03 '23 03:08 manueljordan

Do you mean to open the run or the debug version of the launch config dialog depending on the perspective that is active when pressing that button?

in the Boot Dashboard - as well as the default toolbar of Eclipse - there are two different buttons to either run an application in run mode or in debug mode, independent of the perspective that is active at the moment.

The inconsistency that I see is that there is only one button to edit the launch configuration (which opens the debug variant of the dialog). To have consistency, we could add another button to open the launch config in run mode, but I am not sure whether that adds real value, since you always edit the same launch configurations.

Another option would be to have either run/run launch config buttons or debug/debug launch config buttons, depending on the perspective. But having the same view (the Boot Dashboard) with different icons depending on the active perspective is also something that doesn't fit well with other Eclipse UI behavior.

Not sure why the best answer to your suggestion here is, but I don't see the one best way to do things here.

martinlippert avatar Aug 19 '23 16:08 martinlippert

Sorry by the delay

Do you mean to open the run or the debug version of the launch config dialog depending on the perspective that is active when pressing that button?

At a first glance, it seems it is the "correct/obvious" approach

in the Boot Dashboard - as well as the default toolbar of Eclipse - there are two different buttons to either run an application in run mode or in debug mode, independent of the perspective that is active at the moment.

But what should be the default one? I think the run mode

The inconsistency that I see is that there is only one button to edit the launch configuration (which opens the debug variant of the dialog). To have consistency, we could add another button to open the launch config in run mode, but I am not sure whether that adds real value, since you always edit the same launch configurations.

I understand the situation, but seems here is used/took as default the debug mode ... it seems it is the origin the confusion from the beginning.

Another option would be to have either run/run launch config buttons or debug/debug launch config buttons, depending on the perspective

Sorry I don't understand this point, could you share a kind a draft? perhaps on paper with pencil? a drawing

But having the same view (the Boot Dashboard) with different icons depending on the active perspective is also something that doesn't fit well with other Eclipse UI behavior.

For this scenario, seems the solution is offer the two buttons, run and debug, so when one of them is clicked the dialog window should have the correct title.

Not sure why the best answer to your suggestion here is, but I don't see the one best way to do things here.

Open to share and polish more ideas ...

manueljordan avatar Sep 13 '23 21:09 manueljordan