Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
99 views
in Technique[技术] by (71.8m points)

How to filter call stack in Eclipse debug view for Java

While debugging, the Debug view in Eclipse shows the call stack. Which is great. But I'd love to be able to filter out all the call that I definitely don't care about, such as Spring and the JUnit runner.

Here's an example of my call stack right now. I'd like to keep the entries in bold, while hiding all the rest. Is it possible to do in any way? (plugin, next Eclipse release, configuration, ...)

(com.myproject.mymodule.MyFinderObject.fetchDestinationSettings
com.myproject.mymodule.MyFinderObject.compareCurrentSettings
com.myproject.mymodule.MyFinderObject.compareSettings)
sun.reflect.NativeMethodAccessorImpl.invoke0
sun.reflect.NativeMethodAccessorImpl.invoke
sun.reflect.DelegatingMethodAccessorImpl.invoke
java.lang.reflect.Method.invoke
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
com.myproject.caching.CachingInterceptor.invoke
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
org.springframework.aop.framework.JdkDynamicAopProxy.invoke
$Proxy43.doSthWith
(com.myproject.mymodule.MyFinderObjectTest.testSettingComparisonForCurrentSettings)
sun.reflect.NativeMethodAccessorImpl.invoke0
sun.reflect.NativeMethodAccessorImpl.invoke
sun.reflect.DelegatingMethodAccessorImpl.invoke
java.lang.reflect.Method.invoke
com.myproject.mymodule.MyFinderObjectTest
com.myproject.mymodule.MyFinderObjectTest
com.myproject.mymodule.MyFinderObjectTest
junit.framework.TestResult$1.protect
junit.framework.TestResult.runProtected
junit.framework.TestResult.run
com.myproject.mymodule.MyFinderObjectTest
junit.framework.TestSuite.runTest
junit.framework.TestSuite.run
org.junit.internal.runners.JUnit38ClassRunner.run
org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference
org.eclipse.jdt.internal.junit.runner.TestExecution.run
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
question from:https://stackoverflow.com/questions/3988505/how-to-filter-call-stack-in-eclipse-debug-view-for-java

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The only way I know of to filter the stack trace view is via Mylyn. If you have an active Mylyn task, and you click the "Focus on Active Task (experimental)" button in the Debug View, then the stack trace will be filtered to only show those methods that are in the current task's context.

In this case, you wouldn't be filtering certain items from the stack trace; rather, everything would be out by default, and only certain items would be displayed (those in the task context).

You can look at this answer for more about Mylyn.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...