简体   繁体   中英

IntelliJ IDEA won't step into method in third party jar

I'm using IntelliJ IDEA 14.1.5 to step through a Java program that calls methods in a third party jar (JTidy).

The source for this jar is attached; if I highlight one of its methods and press ctrl-B to go to its declaration, IDEA goes there correctly.

I set a breakpoint within this method, on a statement I know is executing.

I turned off all stepping filters under Settings > Build, Execution Deployment > Debugger > Stepping.

Stepping into methods in the JCL, such as java.lang.String.append() , works properly.

Stepping into this third party jar, however, will not work. Even Force Step Into does not work. The breakpoint within that code also doesn't work; the whole method is treated as a Step Over, which means I can't look at the exact point in the process I need to inspect.

What do I have to check to get this working? It's plausible that attaching the source would not necessarily enable debugging on that code, except that there is at least one other answer on another SO question that suggests that this should work . So does a Tip in IntelliJ's documentation on debugging .

I tried putting a breakpoint inside jTidy code using this code: https://github.com/ajorpheus/simple-maven-testbed (and specifically this commit).

Intellij Build Info:

IntelliJ IDEA 2016.3
Build #IU-163.7743.44, built on November 17, 2016
JRE: 1.8.0_112-release-408-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

The dependency I used was:

    <dependency>
        <groupId>jtidy</groupId>
        <artifactId>jtidy</artifactId>
        <version>r820</version>
    </dependency>

And I had no problems with the breakpoint being hit as seen below: 在此输入图像描述

I thought that it was worth noting that the documentation link in your post is for v. 2016.2 and the other link is as recent as August, 2016. My first impression was that this might have to do with the Intellij IDEA version that you are using, however, this seems to suggest that stepping into decompiled third party code should be supported in 14.1.5 as well.

Is it worth you checking my code with your version of Intellij ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM