简体   繁体   English

隐藏IDE调试器中的堆栈帧(例如Java9 StackWalker)

[英]Hide stack frames in IDE Debugger (e.g. Java9 StackWalker)

Java9's new StackWalker feature made me realize that it would be great if Eclipse (preferably, or IntelliJ) could be configured to use a custom StackWalker that could modify the normal Call Stack view in the IDE's Debugger. Java9的新StackWalker功能让我意识到,如果可以将Eclipse(最好是IntelliJ)配置为使用可以修改IDE调试器中正常调用堆栈视图的自定义StackWalker,那将会很棒。

What I want to do is to hide eg specific technical stack entries when debugging JavaEE programs, but also in many third party support libraries. 我想要做的是在调试JavaEE程序时隐藏例如特定的技术堆栈条目,但在许多第三方支持库中也是如此。 In general I want the option to leave out specific (customizable) stack frames that are not typically of interest, for instance based on (wildcards of) package or class names. 一般情况下,我希望选项省略一些通常不感兴趣的特定(可自定义)堆栈帧,例如基于(通配符)包或类名。 Ideally, "step in" would also automatically skip such frames and step until back inside a "not-suppressed" stack frame. 理想情况下,“步入”也会自动跳过这些帧并逐步进入“未抑制”堆栈帧。

Does anybody know if such a feature is already available in either Eclipse or IntelliJ. 有人知道Eclipse或IntelliJ中是否已有这样的功能。 It's OK if it doesn't specifically use StackWalker but something conceptually similar. 如果它没有专门使用StackWalker,但在概念上类似的东西是没关系的。 Or do you know if such a feature is planned in either IDE. 或者您知道是否在任一IDE中计划了这样的功能。

An excellent feature which makes me wonder why both IDE's don't already have this in their core functionality. 这是一个很棒的功能,让我想知道为什么两个IDE的核心功能都没有。

Eclipse: 日食:

Someone described how to do that without Java9 in Eclipse: https://stackoverflow.com/a/27332733/3931225 . 有人在Eclipse中没有Java9描述了如何做到这一点: https ://stackoverflow.com/a/27332733/3931225。 Sadly that currently only works for Eclipse Luna (4.4). 可悲的是,目前只适用于Eclipse Luna(4.4)。

His work is based on the stackfilter plugin from Intersult, which only works up to Eclipse Indigo (3.7). 他的工作基于Intersult的stackfilter插件 ,它只适用于Eclipse Indigo(3.7)。

Eclipse call stack without any filter: 没有任何过滤器的Eclipse调用堆栈: Eclipse没有过滤器

Eclipse call stack with stackfilter plugin: 使用stackfilter插件的Eclipse调用堆栈: 带过滤器的Eclipse

IntelliJ: 的IntelliJ:

I did not find any way to filter the call stack in IntelliJ, but it does have a step filter 我没有找到任何方法来过滤IntelliJ中的调用堆栈,但它确实有一个步骤过滤器

IntelliJ has a stack filter in the debugger window. IntelliJ在调试器窗口中有一个堆栈过滤器。 It lets you hide entries from libraries that are not your own code. 它允许您隐藏不是您自己的代码的库中的条目。 It is the little filter hopper icon in the top right corner of the stack-frame window 它是堆栈框架窗口右上角的小过滤器漏斗图标

IMG

Once turned on, I only see frames coming from my code. 打开后,我只看到来自我的代码的帧。 As far as I can tell, the debugger respects that selection and does not step into methods that lead to an external library as long as there are stack-frames belonging to your code. 据我所知,调试器尊重该选择,并且只要存在属于您的代码的堆栈帧,就不会进入导致外部库的方法。

Quickly checking the plugin repository did not reveal any promising plugins that provide additional features. 快速检查插件存储库并未发现任何提供附加功能的有前途的插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 具有内部软件包的Java9'-release 8'(例如sun.misc.Unsafe) - java9 '-release 8' with internal packages (e.g. sun.misc.Unsafe) IDE中的智能注释(例如Netbeans) - Smart commenting in an IDE (e.g. Netbeans) 如何在 NetBeans IDE 14 中选择 Java Profile(例如 Compact 1、Compact 2、Full JRE)? - How to select Java Profile (e.g. Compact 1, Compact 2, Full JRE) in NetBeans IDE 14? 以非完全编译语言(例如Java)存储在堆还是堆栈中的变量? - Variables stored on heap vs. stack in a non-fully compiled language (e.g. Java)? 如何在没有任何动画(例如淡入淡出)的情况​​下显示/隐藏软键盘? - How to show/hide the soft keyboard without any animation (e.g. fade) in Java? IntelliJ是否可以隐藏Java样板代码,例如getter和setter - Can IntelliJ hide Java boilerplate code, e.g. getters and setters Java Path 如何转换为例如 InputStream - How is Java Path converted to e.g. InputStream Java合同检查-内置? 例如,哈希码/等于 - Contract Checking in Java - In Built? E.g. Hashcode/Equals 在Java Servlet中使用静态变量(例如在AppEngine中) - Usage of Static variables in Java Servlets (e.g. in AppEngine) 使用Java regexp匹配(例如)Unicode字母 - Matching (e.g.) a Unicode letter with Java regexps
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM