Could not post breakpoints in eclipse

I am using eclipse europa (3.5) for Windows Vista with 64-bit Premium using JDK 1.6.0_18 (32 BIT).

Usually I can fine-tune breakpoints; However, for a specific class that is NOT part of the project (this class is inside the .JAR file (the .JAR file is part of the project)), although I connected the source directory to this .JAR file, I cannot place a breakpoint in this classroom.

If I double-clicked on the breakpoint area (left border), I noticed that the class breakpoint is located. I was wondering if there was any debugging information; However, it turned out that this particular class was compiled using the ant / javac task using debug = "true" and debuglevel = "lines, vars, source". I even ran jad in this class to confirm that it really contains debugging information.

So why does an eclipse stop me from putting a breakpoint?

EDIT: Just to make everyone understand the context, this webapp runs on tomcat 6.0. I remove the debugging application from eclipse after running tomcat from the outside. The application works fine. I am trying to understand the behavior of the above class, which I cannot do, since eclipse does not allow me to install BP.

PS: I saw several topics saying that BP doesn’t get there, but in my case I can’t post BP!

PPS: I tried JDK 1.6.0_16 before trying 1.6.0_18.

Thanks for any pointers.

+7
java debugging eclipse breakpoints
source share
8 answers

Try looking at the Java-> debug-> Step filtering configuration sometime it was turned on, and you cannot stop in the filtered package

+4
source share

It seems that Eclipse cannot find the jar file in the classpath, although you said that the jar file is part of the project. What happens if you run the application normally? Are you getting a ClassDefNotFoundException or something similar?

If you check the tabs in the Run / Debug configuration, you can see which paths and jar files are in the classpath at runtime. You can also add jar files that are not needed to build the application, but are needed to run it.

+2
source share

When I tried to add breakpoints for the .jsp page, it turned out that the page was not opened using the JSP editor, which prevented the setting of breakpoints.

+2
source share

although I linked the source directory to this .JAR file, I cannot place a breakpoint in this class.

You say "source directory". Are you sure this is the same version that was used to compile the jar? If you use a different version of the source code, the line numbers may not match and the breakpoint will not be deleted.

+1
source share

I know about an error in eclipse where breakpoints do not work with a specific version of jdk 1.6.x For more details see here

+1
source share

Use a plugin called Jadclipse to decompile the flag at run time, place a breakpoint at the point where the JAR method is called, then press F6 and you can enter your JAR method.

+1
source share

Just updating the .jar file did the trick for me.

I was able to place breakpoints in all but one of the other class files in the same package. I noticed that when I opened this class file in the editor and selected "Link with Editor", eclipse did not take me to this class file, but only to the package of this class file.

After the update, "Link with Editor" worked, and I was able to place a breakpoint.

If someone can explain this behavior, it will be helpful.

0
source share

Step1: Toggle / Enable breakpoint Set a breakpoint in the line of code or input point of the method from where you want to start debugging the code. Right-click on the left edge of the editor next to the line of code, and a context menu will appear. Select "Toggle Breakpoint" in the context menu

Step 2: setting a breakpoint to stop execution To start debugging, execution must stop at the specified breakpoint. To do this, click on the properties of the breakpoint and do the following:

1. Check Hit count 2. Specify value as 1 3. Select "Suspend thread" option 

This will stop execution when the program hits the breakpoint.

Step 3: moving to the debugging perspective

In Eclipse, select Window -> Open Perspective -> Debug

Step4: Run in debug mode

Now run the program in debug mode. Choose Run → Debug

Now the program starts in debug mode, and you will see the status of the stream as "working"

When a program hits a breakpoint, the state of the thread changes from "running" to "suspied"

Step 5: Debugging Code Using \ Watch variables \ Inspect Expressions

Now the code stops at a breakpoint. You can use watch variables / expression to track the current value of a debug variable. Suppose you set a breakpoint in a variable called "counter" and the program stops at the counter variable. Add an expression with the variable name "counter" that allows you to track the value of the variable during program execution. You can also right-click on the counter variable and select “View” in the context menu If this is a method, select the name of the method and click “Step to Select”. This will allow you to track or debug the execution of the method line by line.

Step6: Use F6 Key To Go To Method

To "enter" the next executable line of code in the current method, press the "F6 Key". This will transfer control of the program from the current line to the next executable line of code.

-one
source share

All Articles