Unable to add breakpoint in eclipse - eclipse

I have same problem as mentioned in this question.
Unable to install breakpoint in sample.java due to missing line number attribute. Modify compiler options to generate line number attributes.
Reason:
Absent line number information
But the interesting part is my preference has already have the setting suggested as the answer. Could anyone please tell me if we have any other working solution for that.

I had the same issue and couldnt find a solution.
I eventualy selected "Restore Defaults" button and selected "apply" button and my problem was solved.

Are you trying to set a breakpoint in the source file? Or did you open the Class file and trying to set the breakpoint? If the source file is in a different project and if you have added the compiled jar of that project in another project, you might get this error.

Check if those settings are different for your project, by right-clicking it on Project Explorer and selecting Properties.

Related

Auto exclude (-externs) option cannot be marked

I have an swc file that I want to compile as external in a flex project.
I use eclipse FDT 5.
i read that I need do `Source -> Remove from Export' on that swc file and besides that under the 'FDT Compiler' properties section I need to mark 'Auto exclude (-externs)'. the problem is that when I mark it and press OK it doesn't get saved and when I get back to the properties page I see it as not marked.
any ideas how to resolve the issue ? is there another way to achieve this ?
i noticed that the file .settings/com.powerflasher.fdt.core.prefs contains compilation options.
is there a way to add this option manually to the prefs file ? for now I need to use a script to manually compile my project until this issue is resolved.
any information regarding the issue would be greatly appreciated.
thanks!
For each swc add the compile argument
-external-library-path+="path/to/library.swc"
If all the swcs are in the same folder then you can just add the path to that folder.
If you're using Windows I think you still need to use forward slashes.

iPhone "_OBJC_CLASS_" compilation error

I am trying to compile my project in Xcode. But i am getting the following error.
"_OBJC_CLASS_$_InfrastructureBenchmarkingViewController", referenced from:
objc-class-ref-to-InfrastructureBenchmarkingViewController in RootViewController.o
4 more of similar type.
Can't understand the meaning of this error?
Small Clarification: Actually the _InfrastructureBenchmarkingViewController was a module in another project. The files pertaining to that I have copied into the new application.
Sometimes it happens when the project definition file (.xcodeproj/project.pbxproj) is somehow messed-up, eg. because of XCode crash or project is taken from someone else, etc.
So try removing InfrastructureBenchmarkingViewController (Delete the file, then choose "Delete reference", so it is not deleted physically from disc) and then again add this file to project (Add > Existing file from the project context menu).
It worked for me several times.
you need to link in whatever framework _InfrastructureBenchmarkingViewController is a part of. Try going to the project window, right click on frameworks and choose add existing framework ....
you should be able to find the framework including _InfrastructureBenchmarkingViewController there.
Seems you have some object files that are not valid anymore. Use the clean option from menu and build it again. That should solve it.

JavaScript validator throws NullPointerException in Eclipse

I'm coding some PHP files on Eclipse IDE, and I keep getting an error that says "Building Workspace has encountered a problem" -- Workspace is the name of my project area.
When I click on the "details" link I get this
Errors occurred during the build.
Errors running builder 'JavaScript Validator' on project 'Ullman'.
java.lang.NullPointerException
As mentioned, I'm working in PHP so I don't know why it's trying to set up JavaScript Validator. I can't figure out how to stop it from doing these things. Anyone know?
I'm not experienced, so please provide a detailed answer if you can.
I just ran into this problem myself and the previous accepted answer was not helpful. The problem is not the validator, it is the build. To fix go to Project -> Properties -> Builders, then disable ‘JavaScript Validator’. Since you are working with PHP your build is getting confused when you try and validate a PHP file with a JavaScript validator.
The error message doesn't really do anything it just gets annoying really fast.
http://blindcoder.wordpress.com/2011/03/04/javascript-validator-problem-in-eclipse/
Project->Properties->Builders then disable 'Javascript Validator
http://blindcoder.wordpress.com/2011/03/04/javascript-validator-problem-in-eclipse/
UPDATE: Cleanshooter's answer is the better one for PHP-specific projects. I'm leaving this answer since it is useful for people who run across the error on JavaScript files because of crashes in the JavaScript parser.
You can disable part of the JavaScript validator with Eclipse -> Preferences -> JavaScript -> Validator -> Errors/Warnings and unchecking Enable JavaScript semantic validation
I am using the Spring Source Tool Suit IDE and i have fixed this issue by following the below steps :
select the Project and choose the properties option.
Select JavaScript > Include Path option and then choose the Source tab.
Click on Edit button and Click Add button.
Now enter the value for Inclusion Pattern as *.js then click on Ok button and Finish.
I have solved my problem in this way. Please let me know if any one have any other way to solve this problem.
Just go to Project -> Build Automatically and disable this option.. you won't need it anyway with PHP.. because there is nothing to be build.. but this solves the NPE thrown at each save or f5 action
For those of you who are having trouble with 'dynamic web projects', you may find that none of the other answers work.
I tried all the options stated here and found that disabling the 'Faceted Project Validation Builder' solved the problem..
right click project --> Builders --> uncheck the 'Faceted Project Validation Builder'
I ran into the same problem and the above suggestions would not resolved it completely unless until I came across to this post # How do I remove javascript validation from my eclipse project?
But even then after doing all (as given the other post url), had to manually removed the "Problems" tab statements like 'Errors' and 'warning' then only it goes away completely at least in Eclipse Juno.
Hope it helps someone.
This is a problem that has happened to me on some Web Dynamic projects. Every time the project is built, I get this error:
Errors occurred during the build.
Errors running builder ‘JavaScript Validator’ on project ‘some-project’.
java.lang.NullPointerException
At a first sight it seems that a Javascript validator is throwing a NullPointerException, so probably you will try to disable Client-side Javascript validation from Project->Properties->Validation… but I tell you that the problem is not there, you must go to
Project->Properties->Builders
then disable Javascript Validator.
Problem solved.
Project->Properties->Builders then disable 'Javascript Validator,
this fixed my problem:
Errors occurred during the build.
Errors running builder 'JavaScript Validator' on project 'xxx'.
29
This is a problem that has happened to me on some Web Dynamic projects. Every time the project is built, I get this error:
“Errors occurred during the build. Errors running builder ‘JavaScript
Validator’ on project ‘some-project’. java.lang.NullPointerException”
At a first sight it seems that a Javascript validator is throwing a NullPointerException, so probably you will try to disable ‘Client-side Javascript’ validation from Project->Properties->Validation… but I tell you that the problem is not there,
you must go to Project->Properties->Builders then disable ‘Javascript
Validator’.
Problem solved. Indeed is not a real problem, but the message is a bit annoying because it happens in every build
in my case, right clicking on project -> "Project->Properties->Builders then disable 'Validation" worked for me.
I had the same error. It happened after adding the D3 js libraries.
My solution to get rid of it:
-I moved the libraries to a server and the html page gets them from there.
-Removed the libraries from the project as they weren't needed there.
Problem solved for me.
Recommandation:
- remove the latest added libraries from your project and see if the error message disappears.
- get the libraries dynamically (in the html) from a server but do not have them in your project.
It doesn't solve the root of the problem but it does help to get rid of immediate frustrations.
Good luck.
Disabling ‘Javascript Validator’ is not the ideal solution. It is just hiding the problem.
What worked for me is this:
Switch to a new or a different workspace from File >Switch Workspace
and then import your existing project into this new workspace.
Problem solved.

Why does my Eclipse project have phantom debugger breakpoints?

I've got a small project which, when run in the Eclipse debugger, always seems to stop in FileInputStream.class line 106, where files are opened. There are no breakpoints set, but Eclipse behaves exactly as if I have a breakpoint here. If I clear all breakpoints, it still happens.
I have a second much-larger project in the same Eclipse workspace which does not suffer from this problem.
I just moved the smaller project off of my old Linux machine, where I developed it in Europa Eclipse and had this problem, onto my new Windows machine, where I continue to see the problem in Ganymede Eclipse. The problem persists across operating systems and across Eclipse versions, yet apparently not across projects. I don't get it! I grepped through every file in this project's directory and couldn't find anything that might be a file somehow directing Eclipse to stop in FileInputStream.
Further info: the apparent breakpoint is actually not for line 106 of FileInputStream; it appears to be an Exception breakpoint for FileNotFoundException, being thrown from native code called from that line in FileInputStream. But again, I don't appear to have any breakpoints set at all. Are Exception breakpoints defined somewhere else?
Did you try to un-select
Window > Preferences > Java > Debug : Suspend execution on uncaught exceptions
? (as mentioned in this thread, for instance)
Why does Eclipse work that way?
It goes back to 2002, when the breakpoint object hierarchy has been stripped down.
In order to set a breakpoint, with the old API, a client required Java Model Objects - such as IType, IField, etc.
With the new API, all that is required by the debug model is type names, field names, etc.
This allows clients to set breakpoints when Java Model Objects are not available.
Clients now specify the resource to associate a breakpoint with (before we constrained it to the associated Java Model resources).
Breakpoints can now also be "hidden". That is, they need not be registered with the breakpoint manager.
Breakpoints can also be selectively persisted (markers only allowed all/none of a marker type to be persisted).
This makes the debug model more flexible, and gives clients more building blocks.
This has also simplified some part of our Java debug implementation - for example, the feature "suspend on any uncaught exception", simply sets a breakpoint for the type named "java.lang.Throwable", rather than a specific IType in a specific project.
The breakpoint is not registered with the breakpoint manager (i.e. hidden) - it is only known and used by one client.
Another example is the "run to line breakpoint". The IJavaRunToLineBreakpoint has been removed, as its special functionality is no longer required. Now, the Java debug ui simply creates a "line breakpoint" that is hidden, non persisted, and has a hit count of 1. This is an example of providing building blocks to clients.
I had a similar problem but the accepted solution did not work for me. I am doing Eclipse Android development and had set some breakpoints and later unset them. Even though I disabled them Eclipse kept stopping execution at these phantom breakpoints. The solution for me was to open the Breakpoints window:
Window > Show View > Other...
Debug > Breakpoints
Then right click any breakpoint and select "Remove All"
Unfortunately you have to reset all your valid breakpoints, but this worked for me and has prevented much angst and frustration going forward.
Some pictures to guide others:
For those who don't find other solutions useful, I found my personal solution to my problem. I work with a .jar library which is generated by building another project into the workspace. If I set a breakpoint in a .java into the library project, then the breakpoint will be triggered when debugging the final project. However when debugger pauses the execution the .class file is shown which has its own breakpoints and therefore the breakpoint set into the .java file is not shown here!
Solution:
In order to remove the breakpoint you have to remove the breakpoint into the .java file, in the library project.
I ran into an issue where a source file had persistent markers for breakpoints that didn't exist. I tried cleaning the project, doing a full build, restarting Eclipse - nothing worked.
I went digging through the Eclipse metadata, and found the projects .markers file. Deleting that file finally fixed the issue.
For anyone else having this issue, open your workspace directory, then navigate to .metadata/.plugins/org.eclipse.core.resources/.projects/your project, then rename/remove file .markers.
For example, if your workspace folder is ~/workspace, and your project is named Foo, you could do:
$ mv ~/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/Foo/.markers ~/safe.Foo.markers
For those who didn't find a solution from the previous answers, they can try what solved my problem. It is I think similar to HAL9000 problem/solution
If you have two classes with the same name (in two different projects) the breakpoints on the one, apply on the other one as well. Both of them show in the "Breakpoints" window.
Solution: If you remove the breakpoint from the class - with the same name - that you are not using it removes the breakpoint from the class you are debugging.

How to change settings for a Visual Studio 2005 Deployment Project

I have a project containing at least one DLL along with the executable output. I have added a Deployment Project to this solution, which asked me for a name and working directory upon creation like all projects.
I named this "MyProduc_Installer" and have been able to modify all aspects of the installation process except for changing the name of the installer itself. Throughout the install process, the user sees messages like "Welcome to the MyProduct_Installer Installer." Even in the Add/Remove Programs list, this is the application's ill conceived title.
How do I change this setting? I have tried right click/properties, as well as all the View options. I couldn't find anything in the assembly information for the executable project, or solution properties.
I have tried right-clicking on the project in the Explorer to change the properties, but here is what I see:
There is no setting here to change the project title.
If you haven't found the answer to this yet, here is the answer.
Visual Studio has 2 sets of properties for Projects -
1 which you can accesss by selecting the Project in Solution Explorer and then right clicking and selecting 'Properties'.
2nd set of properties is in the 'Properies' window which shows up below the Solution explorer. This is the same property window which is displayed for any of the Form property settings or any other control settings.
The 'Product Name' and other project properties for 'Setup' project can be found in the second property window.
Hope this helps.
AC
The easy way to get to the properties you are interested in is to use the F4 shortcut when the project is highlighted. As stated in previous posts this is a very different list to the one you get by right click and selecting properties.
If you mean a Setup project like for winforms, it's the ProductName property. In Studio, I just click on the project name in the Explorer and I get the property window typical to other projects, and it's right there. Other properties include the AddRemoveProgramsIcon, InstallAllUsers, and RemovePreviousVersions.
I happened across this post, where I was having trouble renaming the Product as well.. In regards to using Click Once Publishing.
Since updating all the old names I couldn't get the Publishing to correct itself.
It was found notepading the project file xyz.vbproj in my case and updating the <ProductName>xyz wrong name</ProductName> element that was still wrong.
It was the only place I could find to update it, since the publishing or any property window didn't expose this.