Bug 284704 - Default Launch Configuration should include -consoleLog
Summary: Default Launch Configuration should include -consoleLog
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement with 2 votes (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2009-07-27 05:20 EDT by Lars Vogel CLA
Modified: 2009-12-02 12:53 EST (History)
14 users (show)

See Also:


Attachments
consoleLog Patch (1.05 KB, text/plain)
2009-07-27 05:20 EDT, Lars Vogel CLA
no flags Details
Preferences (2.14 KB, text/plain)
2009-07-27 10:35 EDT, Lars Vogel CLA
no flags Details
Patch for consoleLog (1.08 KB, patch)
2009-11-19 23:07 EST, Lars Vogel CLA
curtis.windatt.public: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2009-07-27 05:20:56 EDT
Created attachment 142629 [details]
consoleLog Patch

Build ID:  20090619-0625

Steps To Reproduce:
Hi,

I believe the default launch configuration should include -consoleLog. The adsense of this parameter makes it harder for new developers to get started and is time-consuming for experienced developers.

Patch attached.

Best regards, Lars

More information:
Comment 1 Curtis Windatt CLA 2009-07-27 10:25:29 EDT
I disagree that it should be on by default.  The log is available through the log views in both the host and the target, not to mention on the file system.  Dumping additional information to the console would likely cause problems for some users.

That being said, I wonder whether we should add an option to the config to turn it on.  So that newer users might see it and use it.  There are many command line arguments available to launch with though, and we don't have options for all of them.  We don't want to clutter the config dialog either.
Comment 2 Lars Vogel CLA 2009-07-27 10:35:23 EDT
Hi Curtis,

If you develop plugins and / or Eclipse RCP applications you do not necessary include the log view, especially if you are a new developer. Finding and reading the log on the filesystem is also challenging for new developers.

I see lots of questions around this issue in the the newsgroups (and I get also lots of email in relation with my tutorial on www.vogella.de/eclipse.html). In case you interested I also blogged about this issue: http://www.vogella.de/blog/2009/07/27/modify-eclipse-pde-code/

My assumption is that almost everyone sets the -configLog anyhow. Do you think that this is not the case?

If you disagee that this should be default then I would also suggest the additional preference dialog. Example patch attached.


Comment 3 Lars Vogel CLA 2009-07-27 10:35:42 EDT
Created attachment 142659 [details]
Preferences
Comment 4 Curtis Windatt CLA 2009-07-27 13:43:11 EDT
Chris might have a better idea what RCP developers are using.
Comment 5 Chris Aniszczyk CLA 2009-07-27 13:49:31 EDT
Lars is correct that most people, at development time will use -consoleLog... this is mostly due to legacy I think. This is before we added support for the fancy log view to read log files automatically from launch configurations. I am not sure whether adding a preference/page for this is right. We already clutter the UI quite a bit.
Comment 6 Lars Vogel CLA 2009-07-27 14:25:29 EDT
@Chris: I think it is more then legacy, the console is a superset of the log view. 

- You see System.out statements
- you can click and get directly to the erroneous
- tracing works to my knowledge only with the console
- you don't have to open a view to see the errors
-  you don't have to include "org.eclipse.ui.views.log" into your RCP application and add a command to open the view


Comment 7 Lars Vogel CLA 2009-09-10 05:28:30 EDT
I saw the poll running from Patrick Paulin for the renaming of Eclipse RCP. I really liked the approach of asking the community for their opinion. I added Patrick to this bug report as I'm referring to him. 

Would you think that it is a good idea to run a poll if developers would like to see the -consoleLog added per default? 

If you think it is I would (try) to setup such a poll to get feedback from the community about this.
Comment 8 Jeff McAffer CLA 2009-09-11 13:33:21 EDT
I always use -consolelog no matter what I'm running.  But I also do not qualify as a typical developer/user
Comment 9 Lars Vogel CLA 2009-11-18 17:52:46 EST
I would like to perform a poll in the Eclipse plugin development community regarding this topic.  

Is this a fair non-influential poll?

--------------
Poll - Default launch configuration for Eclipse plugin  / RCP development

Eclipse shows errors during a launch via the log views in both the host and the target system and on the file system. In addition the developer can specify the flag "-consoleLog" in the launch configuration so see potential error messages in the console view.

Bug Bug 284704 had been opened asking if the "-consoleLog" flag could be included by default in a new launch configuration.

What do you think? If you are a plugin or RCP developer please participate in the following survey: URL to the survey and the question is: 

Title: Eclipse Plugin and RCP Development
Question: Should a default launch configuration for Eclipse plugin and Eclipes RCP development included the -consoleLog flag?

Yes 
No
Comment 10 Curtis Windatt CLA 2009-11-19 09:53:37 EST
More information from the community would be helpful, the poll sounds reasonable.  

I've been running my self-hosting sessions with the argument included and it hasn't bothered me too much.  Only annoying thing is that my console often pops up in front of my other views because it is set to open whenever something is written to it.

I don't feel strongly about it either way, I just don't want to change the user experience unless there is a clear benefit to it (perhaps the poll can make it clear).
Comment 11 Chris Aniszczyk CLA 2009-11-19 10:57:26 EST
In my opinion, I'm OK with this patch as I've seen most people actually add this to their launch configurations.

I think we will need a new patch given that we refactored out the launching code in PDE to a new bundle (org.eclipse.pde.launching)
Comment 12 Ralf Ebert CLA 2009-11-19 13:17:30 EST
I can only agree to adding the default option. In all my RCP training courses I observed that people will miss important warnings logged to the console if they don't turn this on. You look at the console anyway because it gets activated when something is written to stdout/stderr. People working with RCP for some time often don't know about this. And I don't know a situation where this could cause problems in a run configuration (which is only to be used by developers).
Comment 13 Lars Vogel CLA 2009-11-19 13:54:24 EST
Excellent. I start the survey tomorrw then. I'm using the free version of SurveyMonkey which only allow 100 responses but I hope that i sufficient to see a trend.

@Chris: I try to provide an updated patch, should be easy enough...
Comment 14 Lars Vogel CLA 2009-11-19 23:07:31 EST
Created attachment 152670 [details]
Patch for consoleLog
Comment 15 Lars Vogel CLA 2009-11-19 23:08:06 EST
Comment on attachment 142659 [details]
Preferences

New patch attached, marked other patches as obsolete.
Comment 16 Lars Vogel CLA 2009-11-20 09:49:12 EST
FYI: I started the survey under: http://www.vogella.de/blog/2009/11/20/launch-configuration-consolelog/
Comment 17 Benjamin Muskalla CLA 2009-11-20 10:02:27 EST
Definitely +1, it's a real pain in the ass if you're developing applications without the log-view (or even without a UI like server-side Equinox apps). I always include -consolelog into my launch configs and give this advice to everyone in our trainings. I see the point that a new option in the UI could be too much but adding it at least to the default arguments would be great.
Comment 18 Jacek Pospychala CLA 2009-11-20 18:18:41 EST
(In reply to comment #17)
> Definitely +1, it's a real pain in the ass if you're developing applications
> without the log-view (or even without a UI like server-side Equinox apps).

not sure everyone knows, in host Eclipse in Error Log view, clicking "Import Log" gives you a drop-down menu, where you can directly choose a launch configuration which log you'd like to see.
I use it a lot as it's more readable than plain -consoleLog.
Comment 19 martin CLA 2009-11-22 04:47:10 EST
+1 from me, I use -consoleLog all the time.
Comment 20 Gergely Nagy CLA 2009-11-25 16:35:41 EST
+1.

(In reply to comment #5)
Maybe one reasonable way to control this via preferences: configurable default arguments and VM args (in the same format as in the launch config dialog).

This can actually be done as part Target Platform preferences. 
It doesn't clutter the UI with extra check boxes. That said it would be great to have an assistance dialog/wizard when filling out these, similar to the Variables button. Users wouldn't have to always read docs about valid Eclipse and OSGI options.
Comment 21 Matthieu Rejou CLA 2009-11-28 17:46:45 EST
+1 for me too.

I would add Console view contains very, very useful links (add a breakpoint on an exception and stack trace). Debugging without -consoleLog is non-sense for me.
Comment 22 Lars Vogel CLA 2009-11-30 02:38:20 EST
The survey results were in: http://www.vogella.de/blog/2009/11/30/consolelog-runtime-configuration/

In total we had 88 reponses. 74 selected “Yes”, 16 selected “No” (two of the voters selected both “Yes” and “No”).

This means that more then 80 % of the voters are in favor of this change. I would believe that this should be sufficient to change the default behavior.

@Chris / @Curtis: What do you think?
Comment 23 Curtis Windatt CLA 2009-12-01 12:39:17 EST
There is strong enough interest to move forward with the change.  I'll put it in for M4.
Comment 24 Curtis Windatt CLA 2009-12-01 12:45:44 EST
Fixed in HEAD.
Comment 25 Lars Vogel CLA 2009-12-01 12:46:48 EST
Thank you. :-)
Comment 26 Lars Vogel CLA 2009-12-01 13:33:32 EST
I updated the blog entry with the information that this setting will be standard: http://www.vogella.de/blog/2009/11/30/consolelog-runtime-configuration/

Thanks again.

I guess a related discussion is https://bugs.eclipse.org/bugs/show_bug.cgi?id=272076