How to fix breakpoint error when debugging in Eclipse?

Related searches

Need to debug a JAR file "ProA", so import the source code in the project, but there is a strange error in Eclipse while trying to set a breakpoint. Detail as below:

Unable to install breakpoint due to missing line number attributes.
Modify compiler options to generate line number attributes.

I have try to several method to solve, but failed.

  1. Under Window > Preferences: Java > Compiler > Classfile Generation, all options have to be to True
  2. In .settings folder of your project, look for a file called org.eclipse.jdt.core.prefs. Verify or set org.eclipse.jdt.core.compiler.debug.lineNumber=generate
  3. Add the debug=true flag in the build.xml, just like this: <javac srcdir="./src/java" destdir="./bin" debug="true">

Any help will be appreciated.

I have had the same problem, but reading your post helped me resolve mine. I changed org.eclipse.jdt.core.prefs as follow:

BEFORE:

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

AFTER:

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

Another way to modify these options within the Project> Properties> Java Compiler. So, there is no need to modify manually the org.eclipse.jdt.core.prefs file. There you need to make sure that the Classfile Generation options are checked.

breakpoint error when debugging in eclipse, how to fix it, 1) Under "Window --> Preferences --> Java --> Compiler --> Classfile Generation", all options have to be to True. 2) In .settings folder of your project, look for a file called org.eclipse.jdt.core.prefs. 3) add the "debug=true" flag in the build.xml,just like this: 2) In .settings folder of your project, look for a file called org.eclipse.jdt.core.prefs. Verify or set org.eclipse.jdt.core.compiler.debug.lineNumber=generate 3) add the "debug=true" flag in the build.xml,just like this:

In the JAR the line number attributes are missing in the compiled bytecode. With the added source code Eclipse knows the line numbers, but not the Java VM that executes the bytecode and does not see the source code.

It would be useless if Eclipse told the Java VM to stop at a specific line, because the Java VM does not know which command is in which line and so when to stop.

The only solution is to recreate the JAR or at least the bytecode (.class files) with line information of the class(es) where you want to set a breakpoint.

How to Debug Java Errors, Most Java error reports are vague, and identifying the underlying causes can be difficult. A conditional breakpoint: For debugging a Java code in Eclipse IDE, a breakpoint This information gives you more clues to why the problem occurs. When trying to setup the gcc toolchain with Eclipse Luna IDE, I ran into the problem when I can't set a break point when debugging with the GNU ARM J-Link Debugging Support plugin. When I added a breakpoint, I got "No source file named " in the gdb trace. I have made sure that I used -g option when compiling with gcc (make debug).

****Window -> Preferences -> Compiler **** For debugging we need producing line number in class files. after selecting "Add Line Number attributes to generated class files (used by debugger), rebuild the project and run your debugger to see line numbers and breakpoint, and execution pointer. enter image description here

Eclipse Community Forums: Newcomers � Eclipse debug error, I have a problem with debug mode, uninstalling-reinstalling eclipse/JDK have not solved I removed all breakpoints, still I am getting this error I am having this weird bug in eclipse when setting my breakpoints it just over lap it without passing through the breakpoint where the method is called. I know it keeps bypassing it for the reason that the only method that is being called is on a lot of breakpoints. Did anyone encounter this kind of problem or know a fix?

Debugging the Eclipse IDE for Java Developers, Debugging is the routine process of locating and removing bugs, errors or To define a breakpoint in your source code, right-click in the left margin in the Java� MyEclipse (or eclipse) doesn't add any breakpoints itself. I suggest you debug the application again and, when it breaks in sun.misc.URLClassPath, go to the Breakpoints tab in the debug perspective and inspect all the breakpoints you have set. If you double-click on each breakpoint, it should take you to the relevant source file.

28040 – Debug - breakpoint not recognized due to - Bugs, Error pop-up: Attempting to install a breakpoint in the type bla.bla. I added the safest fix, which is to ignore "absent info" exceptions while examining each� At the top of the peek window, there is a hyperlink that indicates the location of the breakpoint. Click the hyperlink to allow modification of the breakpoint location and check Allow the source code to be different from the original. To modify this setting for all breakpoints, go to Debug > Options and Settings.

To define an exception breakpoint click on the Add Java Exception Breakpoint button icon in the Breakpoints view toolbar. You can configure, if the debugger should stop at caught or uncaught exceptions.

Comments
  • You seems to be doing the right configuration. Just try to clean build of your project.
  • Go here: stackoverflow.com/questions/957822/…
  • I have clean the project and tomcat,but the problem still exist.
  • I have read the address below, but not solve the prolbem,so ask again. stackoverflow.com/questions/957822/…
  • I resolved this problem myself and detailed how I did it: stackoverflow.com/a/46553615/1599699 It may be a duplicate JAR issue.