Eclipse Checkpoint Crossing

My problem is not new, and I found several threads about it, but no one helped me. I hope it will be.

I cannot debug eclipse. It recognizes breakpoints, switches to the debug view, but somehow it goes out of sync, and I can't debug my code. Sometimes it works, but after a while it happens again.

I work with JDK 1.6.0_24, Glassfish 3.1, eclipse INDIGO (but this also happens on HELIOS).

I tried (as I found on this site) to install eclipse to use Parallel GC. I tried to put it in the eclipse.ini file, I tried to put the arguments of the Glassfish virtual machine inside myself, and I tried to put additional arguments of the virtual machine in the eclipse JDK (preference β†’ set JRE-> JDK β†’ etc.). Nothing works for me. I also tried them all together.

Help me please.

Thanks to everyone, Ido



EDIT:

OK, I noticed a few more things:

In the Debug view on my stck trace, I found that the exact class with the breakpoint was paused, and it had this comment: "(Suspended breakpoint on line XX)." When I clicked on the line, a green line suddenly appeared. However, as soon as I pressed F6 to continue, it again failed, only the next line was paused. Weird

I checked the processes running on my computer and found that several "java.exe" processes were running at the same time. (eclipse runs on javaw.exe). Perhaps that is why glass fish and the eclipse refuse to work together.

I checked the build path and found that this is my output folder: project-name / target / classes. It's good?

Any thoughts?

Ido

+6
source share
2 answers

So, I could not fix it, but I found a workaround that completely solves this - FINALLY !.

I just stopped using fiberglass WTP for debugging and installed a remote debugger for my local glass fish. it works great with small nasty things, but finally breakpoints are noticed.

Install Remote Debugging

  • Go to the Glassfish admin console and set your glass panel to work in debug mode.
    Click on configuration -> server-config -> JVM settings and check the box "Debugging is enabled".
    Restart server

  • In eclipse, starting the server in normal mode (not debugging is useless).

  • Go to Debug Configurations and find "Remote Java Application"

  • Create a new application debug configuration for remote java

  • Enter a name (say Glassfish-Debug)

  • Select a project to debug

  • Enter your own IP address in the host section and set the port to 9009
    enter image description here

  • This is optional, but it’s more convenient to work with:
    Click the General tab and check the Debug box.
    This will allow you to configure this configuration for Glassfish remote debugging in the debug menu.
    enter image description here

What is it. Now all you have to do is always start Glassfish in normal mode, and then go to Debug settings and run this remote Glassfish debugging that you just installed.
enter image description here

And now I get to the annoying part: after the restoration of your project, sometimes you may not synchronize again. You just need to disconnect the remote debugging session and start it again. Low price to pay.

Hope this helps.

+4
source

I ran into similar problems, but it turned out that it was a simpler problem with several versions of the installed JRE / JDK.

Try Debug -> Run Configuration -> JRE -> Alternate JRE -> select JDK 1.6.0_24.

Also check the project build paths if the correct Jars are used.

Hope this helps.

0
source

Source: https://habr.com/ru/post/916250/


All Articles