Search code examples
netbeansglassfishjava-ee-7

Debugger doesn't stop at breakpoints in Glassfish on Netbeans


I'm running Glassfish on Netbeans, but debugger can't stop at breakpoints.
I started Glassfish with "Debug-mode", attached debugger to 9009 port, as I saw in log file. I set a breakpoint on a line in my Managed-Bean code, right clicked the project and selected "Debug".
But the debugger never stopped and I couldn't find any errors. Even if I set breakpoints on other lines, it didn't work. Do I need any other configurations ?
Here is my environment.

  • JDK 1.8.0_60
  • Netbeans 8.1
  • Glassfish 4.1.1
  • JavaEE 7

Could somebody let me know what I am wrong ?


Solution

  • When you attach the debugger, do you see a "X" inside the debug image? If you see one than your code isn't "synchronized". You need to redeploy your application in order to "synchronize" your code with se sources deployed on the server.

    I have a glassfish 3.x here and some options may be a little different but I have a option in the "Debug Options" which is something like server=y,suspend=n if I don't have this exactly like that my debugger doesn't stop.