2015-01-19 2 views
0

Для отладки проблем производительности Eclipse, я создал этот .options файл:проблемы производительности отладки Eclipse,

org.eclipse.jdt.ui/debug=true 
org.eclipse.jdt.launching/debug = true 
org.eclipse.jdt.launching/debug/classpath/jreContainer = true 

# trace generation of type constraints and create toString info for debugging 
org.eclipse.jdt.ui/debug/TypeConstraints=false 

# timing output for code assist 
org.eclipse.jdt.ui/debug/ResultCollector=false 

org.eclipse.jdt.debug/debug=false 
org.eclipse.jdt.debug/debug/jdiEvents=false 
org.eclipse.jdt.debug/debug/jdiRequestTimes=false 
org.eclipse.jdt.debug/debug/astEvaluations=false 
org.eclipse.jdt.debug/debug/astEvaluations/callingThreads=false 

# Turn on debug tracing for org.eclipse.jdt.core plugin 
org.eclipse.jdt.core/debug=true 

# Reports java builder activity : nature of build, built state reading, indictment process 
org.eclipse.jdt.core/debug/builder=true 

# Reports java builder stats 
org.eclipse.jdt.core/debug/builder/stats=true 

# Reports compiler activity 
org.eclipse.jdt.core/debug/compiler=true 

# Turn on debugging for the org.eclipse.core.resources plugin. 
org.eclipse.core.resources/debug=true 

# Reports the start and end of all builder invocations 
org.eclipse.core.resources/build/invoking=true 

# Reports the start and end of build delta calculations 
org.eclipse.core.resources/build/delta=true 

# For incremental builds, displays which builder is being run and 
because of changes in which project. 
org.eclipse.core.resources/build/needbuild=true 

# Prints a stack trace every time an operation finishes that requires a 
build 
org.eclipse.core.resources/build/needbuildstack=true 

Файл находится в той же папке, eclipse.ini.

Когда я открываю о диалоге, я могу увидеть вариант -debug в переменной eclipse.commands:

... 
-product 
org.eclipse.epp.package.jee.product 
-console 
-consoleLog 
-debug 
$HOME/tools/eclipse/kepler-SR2 
-data 
$HOME/workspace 
-vm 
$HOME/tools/java/jdk1.8.0_25/bin/java 
... 

(я заменил мою домашнюю папку с $HOME по причинам конфиденциальности).

Но я не вижу вывода трассировки в консоли, где я начал Eclipse. Я вижу выход из М2Э:

2015-01-19 17:04:46,892 [Worker-12] INFO o.e.m.c.i.embedder.EclipseLogger - Using 'UTF-8' encoding to copy filtered resources. 
2015-01-19 17:04:46,892 [Worker-12] INFO o.e.m.c.i.embedder.EclipseLogger - Copying 1 resource 

При нажатии Enter, я получаю OSGi подсказку.

Но никаких следов выхода трассы. Что я упустил?

+1

Вы указываете -debug в командной строке? Это должно быть указано на консоли, где считываются различные файлы конфигурации, включая файл отладки. –

+1

@ greg-449: Это может быть ключом. Я вижу 'Debug options:' и 'file: $ HOME/tools/eclipse/kepler-SR2 загружен'. Я бы ожидал здесь ... .../kepler-SR2/.options'; 'kepler-SR2' - это папка. –

ответ

0

При запуске Eclipse с -debug вы можете видеть, какие файлы конфигурации загружаются во время запуска. Выходной сигнал выглядит так:

... 
Install location: 
    file:$HOME/tools/eclipse/kepler-SR2/ 
Configuration file: 
    file:$HOME/tools/eclipse/kepler-SR2/configuration/config.ini loaded 
Configuration location: 
    file:$HOME/tools/eclipse/kepler-SR2/configuration/ 
Framework located: 
    file:$HOME/tools/eclipse/kepler-SR2/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar 
Framework classpath: 
    file:$HOME/tools/eclipse/kepler-SR2/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar 
Splash location: 
    $HOME/tools/eclipse/kepler-SR2//plugins/org.eclipse.platform_4.3.2.v20140221-1700/splash.bmp 
Debug options: 
    file:$HOME/tools/eclipse/kepler-SR2/.options loaded 
Time to load bundles: 5 
... 

Обратите внимание на последний путь, который дает параметры отладки. В приведенном выше случае это было:

Debug options: 
    file:$HOME/tools/eclipse/kepler-SR2 loaded 

который является папкой ... Почему Eclipse это сделает? Потому что это было сказано так:

-debug 
$HOME/tools/eclipse/kepler-SR2 
-data 

Обратите внимание на путь между -debug и -data? Избавьтесь от этого, и он будет работать (или указать путь к файлу реальных опций).