Run/Debug from context menu: create run configuration or not?

Hi All,

There is a usability problem with Run/Debug/Test popup menu items which is
partually described by
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706 and also was
already discusssed by "creating runnable configurations and run/debug
context menu" thread. I will descrbe it more precisely.

Currently there is 2 menu items in the popup menu of an application class
(with main() method): Run and Debug. Both create a new run configuration (if
there is none for this class yet) and run or debug it correspondently. If
the checkbox "Display settings before running/debugging" is on, the dialog
with run confgiration parameters is shown allowing user to edit them before
running or debugging.
For a testcase class (or an individual test method) there is an additional
menu item "Test". It does the same as "Run" but does not create new run
configuration.

We see the following problems with the current approach:
1. None seems to understand the different between "Run" and "Test".
2. There is no ability to debug a particular test without creating
configuration for it (similar to "Test" for running).
3. There is no ability similar to "Test" for application classes (see
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu items
(for application class, testcase class or an individual test method): Run,
Debug and Create. Run and Debug do not create new configurations and Create
creates a run configuration (but does not run anything). This solution does
not seem to be ideal however. At least, what is "Create" for does not seem
to be clear to the user.

Your opinions are very welcome.


--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


15 comments

We see the following problems with the current approach:
1. None seems to understand the different between "Run" and "Test".
2. There is no ability to debug a particular test without creating
configuration for it (similar to "Test" for running).
3. There is no ability similar to "Test" for application classes (see
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).


4. Running/Debugging a class creates always a configuration. =>
Configurations become very fast unreadable for us (~30-40 main classes).

5. When option "Display settings before running/debugging" is unchecked
(usually the default for us), it's not that simple to create a
configuration, that needs to be fine tuned.

... Run and Debug do not create new configurations and Create creates a
run configuration (but does not run anything).


This sounds very good. Invoking "Create..." should always open the
configuration dialog, so you can tweak the configuration (if you do not
want to tweak it, you needn't it at all).

If you run a class, that does not have a configuration, the default
configuration should be used instead.

Please make it visually clear (in the context menu), whether the Run/Debug
runs the default or a tweaked configuration.

Tom

0

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu items
(for application class, testcase class or an individual test method): Run,
Debug and Create. Run and Debug do not create new configurations and Create
creates a run configuration (but does not run anything). This solution does
not seem to be ideal however. At least, what is "Create" for does not seem
to be clear to the user.


Another alternative (maybe this was already discusssed) is four actions:

- run wo/create
- debug wo/create
- run w/create
- debug wo/create

Only the wo/create would be in the popup menu (I say this because this
is what /I/ use 99.9999% of the time). The other two, w/create, would be
in the main menus. The w/create could also be available in the pupup via
shift-click for some such.

0

I have recently become addicted to the test menu item. (I assign a shortcut to it -- ctrl-alt-t). When working on my test cases, I constantly run the test case my cursor happens to be on. WHen done with the class, I do a test on the class (whereby IDEA automatically figures out the test methods, and does the right thing).

Am I still going to be able to work this way?

Although I initially found the construction of the configuration irritating, I find that when I go to debug, it is more convenient to do that off of a configuration, rather then from the menu or key binding.

Mike

0

That would be alt-shift-t...Not ctrl-alt-t.

Mike

0

Another possible approach:
There will be "temporary configuration". Each Run/Debug will remove previous
"temporary configuration" and create it's own new one. This configuration
will look and behave like "general configuration" (probably it will have a
bit special icon). It can be selected, copied (if you decide that you need
it more than for just one run).

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com


0

I like this. THis is exactly how I use the current configurations. I run, then the test fails. So, I debug. I debug by going to the configuration it generated, and selecting it, and hitting debug.

Ideally, when running, it creates a temporary configuration, and then sets that configuration as the current default. So simply hitting the "bug" will debug the correct code.

Mike

0

I have recently become addicted to the test menu item. (I assign a

shortcut to it -- ctrl-alt-t). When working on my test cases, I constantly
run the test case my cursor happens to be on. WHen done with the class, I
do a test on the class (whereby IDEA automatically figures out the test
methods, and does the right thing).
>

Am I still going to be able to work this way?


Because of there is no action "Test" your shortcut will not work anymore.
However, you can remap your short to "Run" action (the difference is it will
run main() if you press it in not-test class or inside testclass.main).

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com


0

Valentin Kipiatkov wrote:

Hi All,

There is a usability problem with Run/Debug/Test popup menu items which is
partually described by
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706 and also was
already discusssed by "creating runnable configurations and run/debug
context menu" thread. I will descrbe it more precisely.

Currently there is 2 menu items in the popup menu of an application class
(with main() method): Run and Debug. Both create a new run configuration (if
there is none for this class yet) and run or debug it correspondently. If
the checkbox "Display settings before running/debugging" is on, the dialog
with run confgiration parameters is shown allowing user to edit them before
running or debugging.
For a testcase class (or an individual test method) there is an additional
menu item "Test". It does the same as "Run" but does not create new run
configuration.

We see the following problems with the current approach:
1. None seems to understand the different between "Run" and "Test".
2. There is no ability to debug a particular test without creating
configuration for it (similar to "Test" for running).
3. There is no ability similar to "Test" for application classes (see
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu items
(for application class, testcase class or an individual test method): Run,
Debug and Create. Run and Debug do not create new configurations and Create
creates a run configuration (but does not run anything). This solution does
not seem to be ideal however. At least, what is "Create" for does not seem
to be clear to the user.

Your opinions are very welcome.


For me it seems, that approach with:
run using last configuration (default if none)
create/select configuration and run

and similar for debug seems more appropriate.

Also it seems to me, that run dialog in toolbar makes sense only for
applications and doen't make sense for tests (at least it's my pattern
of usage, tests are usually run from project or source view).

Kind Regards

Sergey Yevtushenko

0


Just to be persnickety, I would suggest that whatever solution is come up with it should be consistently applied in the 'Run/JUnit Tests...' main menu item, which currently has no way of not creating a configuration

0

Sergey Yevtushenko wrote:

Valentin Kipiatkov wrote:

>> Hi All,
>>
>> There is a usability problem with Run/Debug/Test popup menu items
>> which is
>> partually described by
>> http://www.intellij.net/tracker/idea/viewSCR?publicId=3706 and also was
>> already discusssed by "creating runnable configurations and run/debug
>> context menu" thread. I will descrbe it more precisely.
>>
>> Currently there is 2 menu items in the popup menu of an application class
>> (with main() method): Run and Debug. Both create a new run
>> configuration (if
>> there is none for this class yet) and run or debug it correspondently. If
>> the checkbox "Display settings before running/debugging" is on, the
>> dialog
>> with run confgiration parameters is shown allowing user to edit them
>> before
>> running or debugging.
>> For a testcase class (or an individual test method) there is an
>> additional
>> menu item "Test". It does the same as "Run" but does not create new run
>> configuration.
>>
>> We see the following problems with the current approach:
>> 1. None seems to understand the different between "Run" and "Test".
>> 2. There is no ability to debug a particular test without creating
>> configuration for it (similar to "Test" for running).
>> 3. There is no ability similar to "Test" for application classes (see
>> http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).
>>
>> In the build #814 we implemented another solution (unfortunately #814 or
>> later is not available for the community yet). There are always 3 menu
>> items
>> (for application class, testcase class or an individual test method):
>> Run,
>> Debug and Create. Run and Debug do not create new configurations and
>> Create
>> creates a run configuration (but does not run anything). This solution
>> does
>> not seem to be ideal however. At least, what is "Create" for does not
>> seem
>> to be clear to the user.
>>
>> Your opinions are very welcome.
>>
>>


For me it seems, that approach with:
run using last configuration (default if none)

Some more comments to my last post: when running with default
parameters, than this configuration shouldn't be stored. (At least for
tests).

create/select configuration and run

and similar for debug seems more appropriate.

Also it seems to me, that run dialog in toolbar makes sense only for
applications and doen't make sense for tests (at least it's my pattern
of usage, tests are usually run from project or source view).

Kind Regards

Sergey Yevtushenko

Friendly
Sergey

0


>Also it seems to me, that run dialog in toolbar makes sense only for
>applications and doen't make sense for tests (at least it's my pattern
>of usage, tests are usually run from project or source view).

Ack! No! I run test series from the toolbar all the time.
Indeed, the only buttons on the toolbar I couldn't do without is the "Run" button, which is normally set on an "all tests in project" configuration. Very sweet.

(Until reading this note, I didn't even realize that you could run test from the project window. Way cool.)

0


"Valentin Kipiatkov" <valentin@intellij.com> wrote in message
news:b9t7pa$q3$1@is.intellij.net...

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu

items

(for application class, testcase class or an individual test method): Run,
Debug and Create. Run and Debug do not create new configurations and

Create

creates a run configuration (but does not run anything). This solution

does

not seem to be ideal however. At least, what is "Create" for does not seem
to be clear to the user.

>
I like this new approach - of course when I'm in the user "role, I'll only
know what I wanted after I get it ;)

Edo


0

The "Create" idea sounds nice (very "object-oriented") and definitely can be considered as an
alternative option, but I'd still vote for having a "temporary" or "current" configuration
automatically created or filled up. The reason is that with "Create" you'd have to know
in advance that you want to keep the configuration. The real case scenario for me is the
following:

1. Run some class/test/whatever
2. In one or two out of ten runs (avg.) say "oops, I need to debug this!"
3. Debug the same configuration.

So the main idea is to have some trace of your actions with the
ability to undo/redo your actions. If I had my current config automatically
created for me I would be able to stop the run (undo) and run it again in debugger (redo).

I'd prefer to have a setting to choose if I want to reuse the same "current" configuration
for every run or create a new one every time (current behavior). In the last case it would
be nice to have a command like "delete all temporary configs" and ability to configure
an automatic clean up upon IDEA restart. This way configs would not accumulate
indefinitely.

And by the way, about tracking but something off topic, wouldn't it be wonderful to have
an ability to keep track of the running code in the debugger and/or run? I do recall now
there was some commercial product which allows to do just that. It can keep track of
the program state and let you to investigate the reason of a crash down to variables'
values and monitors' states. Must be an indispensable tool for debugging of distributed
code and intermittent or time related problems. Is it worth filing a feature request?

--Oleg

"Valentin Kipiatkov" <valentin@intellij.com> wrote in message news:b9t7pa$q3$1@is.intellij.net...

Hi All,

>

There is a usability problem with Run/Debug/Test popup menu items which is
partually described by
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706 and also was
already discusssed by "creating runnable configurations and run/debug
context menu" thread. I will descrbe it more precisely.

>

Currently there is 2 menu items in the popup menu of an application class
(with main() method): Run and Debug. Both create a new run configuration (if
there is none for this class yet) and run or debug it correspondently. If
the checkbox "Display settings before running/debugging" is on, the dialog
with run confgiration parameters is shown allowing user to edit them before
running or debugging.
For a testcase class (or an individual test method) there is an additional
menu item "Test". It does the same as "Run" but does not create new run
configuration.

>

We see the following problems with the current approach:
1. None seems to understand the different between "Run" and "Test".
2. There is no ability to debug a particular test without creating
configuration for it (similar to "Test" for running).
3. There is no ability similar to "Test" for application classes (see
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).

>

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu items
(for application class, testcase class or an individual test method): Run,
Debug and Create. Run and Debug do not create new configurations and Create
creates a run configuration (but does not run anything). This solution does
not seem to be ideal however. At least, what is "Create" for does not seem
to be clear to the user.

>

Your opinions are very welcome.

>
>

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>


0

It's a bit odd that Create would just put the entry in the list, without
going anywhere further. How about you open the config dialog and offer an
option to Run/Debug from there (similar to what you have when display
setting before run/debugging is set, but with both run and debug buttons)?


Keeping the last execution as a temporary entry seems like a viable option
as well. Another possible solution to the run first then go in debug mode
might be a "debug this" button on the run result tab, next to the re-run
one (I even see those two tabs integrated somehow, although that might
raise other problems).

Andrei



Valentin Kipiatkov wrote:

Hi All,

There is a usability problem with Run/Debug/Test popup menu items which is
partually described by
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706 and also was
already discusssed by "creating runnable configurations and run/debug
context menu" thread. I will descrbe it more precisely.

Currently there is 2 menu items in the popup menu of an application class
(with main() method): Run and Debug. Both create a new run configuration
(if there is none for this class yet) and run or debug it correspondently.
If the checkbox "Display settings before running/debugging" is on, the
dialog with run confgiration parameters is shown allowing user to edit
them before running or debugging.
For a testcase class (or an individual test method) there is an additional
menu item "Test". It does the same as "Run" but does not create new run
configuration.

We see the following problems with the current approach:
1. None seems to understand the different between "Run" and "Test".
2. There is no ability to debug a particular test without creating
configuration for it (similar to "Test" for running).
3. There is no ability similar to "Test" for application classes (see
http://www.intellij.net/tracker/idea/viewSCR?publicId=3706).

In the build #814 we implemented another solution (unfortunately #814 or
later is not available for the community yet). There are always 3 menu
items (for application class, testcase class or an individual test
method): Run, Debug and Create. Run and Debug do not create new
configurations and Create creates a run configuration (but does not run
anything). This solution does not seem to be ideal however. At least, what
is "Create" for does not seem to be clear to the user.

Your opinions are very welcome.



0

Please sign in to leave a comment.