如何迫使IntelliJ只进入我的源代码? [英] How to force IntelliJ to only step into my source code?

查看:203
本文介绍了如何迫使IntelliJ只进入我的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在尝试使用IntelliJ调试的Spring MVC项目。

I have a Spring MVC project that I'm trying to debug using IntelliJ.

如果我在Controller代码中设置了断点,则调试将在适当的位置停止地点。该特定行在另一个bean中具有更多我自己的代码。我希望能够进入代码。如果在断点触发之后立即进入,它将进入Spring的AOP框架代码。

If I set a breakpoint in my Controller code, the debug stops at the appropriate place. That particular line has more of my own code in another bean. I'd like to be able to step into the code. If I "step into" immediately after the breakpoint riggers, it steps into Spring's AOP framework code.

如果我触发了相同的断点并立即智能地进入,它将使我处于第-源文件中的1(在上图中显示)。这行-1表示什么?如果我再次执行智能操作,则最终会在原始断点之后到达该行,但从未将其放置在我想进入的方法中。

If I trigger the same breakpoint and "smart step into" immediately, it puts me at line -1 of the source file (apparent in the graphic above). What is this line -1 signify? If I do "smart step into" again, I end up at the line after my original breakpoint, but never having been placed inside the method I wanted to step into.

我尝试将Spring AOP软件包放入Debugger设置中,不要进入类。但是,我最终还不得不放入事务类以及其他几个事务类。最后,我将所有Spring放入列表中……以及SLF4J和一些JDBC驱动程序。

I have tried putting the Spring AOP package into the Debugger setting Do not step into the classes. However, I also ended up having to put in transaction classes as well as several others. In the end, I put all of Spring into the list ... and SLF4J and some JDBC drivers.

我怎样才能让IntelliJ只停止在我的项目源代码中代码,除非我使用诸如强行进入之类的代码?

How can I just get IntelliJ to only stop in my project source code unless I use something like "force step into"?

推荐答案

目前,没有针对用户代码(例如 Visual Studio的只是我的代码 )。

Currently there is no overall option to only target user code (like Visual Studio's 'Just My Code').

具有相同行为的最佳方法是排除特定的代码类或程序包(可以通过通配符为类程序包设置过滤器模式),而不会使用走进'。

The best way to have the same behavior is to exclude specific code classes or packages (it is possible to setup filter patterns for class packages via wildcards) that will not be 'stepped into'.

这可以在设置/首选项调试器/步进选项中实现。

This can be achieved within the Settings/Preferences, in the Debugger/Stepping options.

这篇关于如何迫使IntelliJ只进入我的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆