Line breakpoints don't work in some classes

10,382

Solution 1

I've received further support on intelliJ Idea servicedesk and the issue was temporarily? fixed by removing the war file from my local maven repository.

Solution 2

I had exactly the same problem and have just worked around it - don't know if your setup is the same but my problem was that my class files were being output into a folder under the content root of my module (even though I did have the folder marked as excluded in my module settings).

I deleted all my local class files, updated the Compiler Output settings to point outside my content root, rebuilt the project and now everything is working as expected.

Share:
10,382
NeplatnyUdaj
Author by

NeplatnyUdaj

Updated on August 11, 2022

Comments

  • NeplatnyUdaj
    NeplatnyUdaj over 1 year

    I'm using intellij Idea to debug an application running on tomcat. But I have a problem that in some classes, the line breakpoints don't work(method breakpoints are working fine...but slow). I can get to the specific line of code or inspect variables by stepping in to the class from the method breakpoint or from another class, but the debugger doesn't stop on any line. (IntelliJ shows empty red circle(no cross))

    Update: This problem is not limited to Tomcat. I have the same issues on Weblogic with different project. So it's either a problem of Idea or Java.

    What may be the possible reasons? There are no special compiler options and when I decompiled the class, the LineNumberTables and LocalVariableTables are there. The two classes(the one where line breakpoints are fine and one where aren't) are in the same package. My sources match the deployed code exactly. I've cleared all intellij idea caches(also [system]/jars, which was suggested here: Debugger doesn't stop at source code in Intellij IDEA )

    • Java 1.6.0_43 (64bit)
    • IntelliJ Idea 12.1.3
    • Tomcat 6.0.36
    • Debian testing
    • It works fine for other developer using Windows so it's not a problem of the project

    When I enable debugger tracing in Idea as suggested by the CrazyCoder, I get these results(showing the output when I add/remove line breakpoint in idea):

    Class which is fine

    ==== Enable Breakpoint ====
    [JDI: Sending Command(id=25172) JDWP.EventRequest.Set]
    [JDI: Sending:                 eventKind(byte): 8]
    [JDI: Sending:                 suspendPolicy(byte): 1]
    [JDI: Sending:                 modifiers(Modifier[]): ]
    [JDI: Sending:                     modifiers[i](Modifier): ]
    [JDI: Sending:                     modKind(byte): 5]
    [JDI: Sending:                         classPattern(String): com.teamead.fwf.web.controller.ino.datauser.flightplan.EquipmentDefinition]
    [JDI: Receiving Command(id=25172) JDWP.EventRequest.Set]
    [JDI: Receiving:                requestID(int): 23]
    [JDI: Retrieving matching ReferenceTypes, sig=Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/EquipmentDefinition;]
    [JDI: Sending Command(id=25174) JDWP.VirtualMachine.ClassesBySignature]
    [JDI: Sending:                 signature(String): Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/EquipmentDefinition;]
    [JDI: Receiving Command(id=25174) JDWP.VirtualMachine.ClassesBySignature]
    [JDI: Receiving:                classes(ClassInfo[]): ]
    [JDI: Receiving:                    classes[i](ClassInfo): ]
    [JDI: Receiving:                    refTypeTag(byte): 1]
    [JDI: Receiving:                    typeID(long): ref=7269]
    [JDI: Receiving:                    status(int): 7]
    [JDI: Looking up Class, signature='Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/EquipmentDefinition;', id=7269]
    [JDI: Sending Command(id=25176) JDWP.EventRequest.Set]
    [JDI: Sending:                 eventKind(byte): 2]
    [JDI: Sending:                 suspendPolicy(byte): 2]
    [JDI: Sending:                 modifiers(Modifier[]): ]
    [JDI: Sending:                     modifiers[i](Modifier): ]
    [JDI: Sending:                     modKind(byte): 7]
    [JDI: Sending:                         loc(Location): com.teamead.fwf.web.controller.ino.datauser.flightplan.EquipmentDefinition:24]
    [JDI: Receiving Command(id=25176) JDWP.EventRequest.Set]
    [JDI: Receiving:                requestID(int): 24]
    
    ==== Disable Breakpoint ====
    [JDI: Sending Command(id=25178) JDWP.EventRequest.Clear]
    [JDI: Sending:                 eventKind(byte): 2]
    [JDI: Sending:                 requestID(int): 24]
    [JDI: Receiving Command(id=25178) JDWP.EventRequest.Clear]
    [JDI: Sending Command(id=25180) JDWP.EventRequest.Clear]
    [JDI: Sending:                 eventKind(byte): 8]
    [JDI: Sending:                 requestID(int): 23]
    [JDI: Receiving Command(id=25180) JDWP.EventRequest.Clear]
    

    Class which is not fine

    ==== Enable Breakpoint ====
    [JDI: Sending Command(id=25182) JDWP.EventRequest.Set]
    [JDI: Sending:                 eventKind(byte): 8]
    [JDI: Sending:                 suspendPolicy(byte): 1]
    [JDI: Sending:                 modifiers(Modifier[]): ]
    [JDI: Sending:                     modifiers[i](Modifier): ]
    [JDI: Sending:                     modKind(byte): 5]
    [JDI: Sending:                         classPattern(String): com.teamead.fwf.web.controller.ino.datauser.flightplan.FlightPlanBackingBean]
    [JDI: Receiving Command(id=25182) JDWP.EventRequest.Set]
    [JDI: Receiving:                requestID(int): 25]
    [JDI: Retrieving matching ReferenceTypes, sig=Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/FlightPlanBackingBean;]
    [JDI: Sending Command(id=25184) JDWP.VirtualMachine.ClassesBySignature]
    [JDI: Sending:                 signature(String): Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/FlightPlanBackingBean;]
    [JDI: Receiving Command(id=25184) JDWP.VirtualMachine.ClassesBySignature]
    [JDI: Receiving:                classes(ClassInfo[]): ]
    [JDI: Receiving:                    classes[i](ClassInfo): ]
    [JDI: Receiving:                    refTypeTag(byte): 1]
    [JDI: Receiving:                    typeID(long): ref=7257]
    [JDI: Receiving:                    status(int): 7]
    [JDI: Looking up Class, signature='Lcom/teamead/fwf/web/controller/ino/datauser/flightplan/FlightPlanBackingBean;', id=7257]
    
    ==== Disable Breakpoint ====
    [JDI: Sending Command(id=25186) JDWP.EventRequest.Clear]
    [JDI: Sending:                 eventKind(byte): 8]
    [JDI: Sending:                 requestID(int): 25]
    [JDI: Receiving Command(id=25186) JDWP.EventRequest.Clear]