Community
Participate
Working Groups
The -debug flag, combined with .options files, supports troubleshooting of problems in the field. However, it is difficult for users to send the trace output to a file, instead of having it scroll to the console, especially if the user is invoking Eclipse via a shortcut to a branded .exe instead of calling eclipse.exe at the command line. It would be helpful if there were a command-line option, also supported in the launcher .ini file, to send debug output to a file. E.g., the .ini file would end up with something like: -debug c:/eclipse/debug.options -debugout c:/temp/traceoutput.txt Sorry if I've assigned this to the wrong component.
This would require new API to log the information. Currently we have a DebugOptions interface which allows bundles to query whether or not we are in debug mode, but all bundles log their own debug information wherever they like.
I think that most components probably use the ILog interface obtained through Plugin.getLog(). It is okay to just catch that one; there is of course no way to intercept all possible logging mechanisms that a component might invent.
Just to make sure we aren't mixing use cases, I'll explain the current situation. Currently you can call Platform#getLog (or acquire the log service) and log events there. You can also check if you are in debug mode and if so, then do whatever you want. I would wager that currently most people log these events to the console. So you're suggesting that we add API to the log so you can put debug information there? I think this might not be the best idea since the log file has a specific format and multiple teams rely on this and have readers, etc. If we are to make changes in this area, I would suggest somewhere related to DebugOptions.
Oops, sorry, wasn't thinking clearly. Right, tracing does NOT usually use Log. But I expect tracing *does* usually use System.out and/or System.err. Redirecting one or both of those would be very handy. (It's hard to do this in the normal manner from the command line, because the launcher gets in the way.)
Would fixing bug 173962 solve you issue? Then you could do something like: eclipse.exe 1>trace.out 2>&1
Yes, that would be perfect. *** This bug has been marked as a duplicate of bug 173962 ***