PHPStorm - show all errors on inspection - phpstorm

PHPStorm newbie question.
I'd installed PHPStorm yesterday and was very impressed. It identified countless small issues with my code, like referencing non-static classes statically - I loved that it highlighted the problems in my open PHP files. There was a bit long list in the "inspection results" section (I think) which identified errors in various groupings. Great!
Today I can't get it to identify any errors at all, other than "Typos". Same project.
Clearly I messed up a a configuration somewhere, but I'm pretty baffled as to where. I've been through the Preferences section for the last hour trying different things, but can't get it to work as before.
Any tips...?
Ben

Editor not doing proper code highlighting or not working inspections can be caused by the corrupted caches.
The solution is to do File | Invalidate Caches and restart the IDE.

Invalidating caches didn't worked for me.
In my case inspections were disabled because I had activated a wrong profile that wasn't checking PHP issues.
So be sure to check the used profile:

Related

directory name not permitted in url

This is a weird issue that I've resolved but I'm just wondering if anyone knows the cause of it. I have a number of directories under a directory named images. They inherit the same permissions and new ones always work fine. Yesterday I created a directory named 'archive001' but 'mysite/images/archive001/myimage.jpg' threw a 403 error. After sleeping on it I changed the directory name to 'archv001' and woohoo it worked fine. I remember have the same problem in the past but with a couple words I can't remember - using IIS7 and asp.net mvc. Not a critical issue but just curious if anyone has any idea why this happened? I only tested it in chrome
Issue was a rewrite rule that I must have added some time ago (programs been running since 2010 or so). Rewrite was to prevent spiders and had to be something I copied somewhere. Disabling it got rid of the issue. Thank you #LexLi.
Any comments on the use of the spider rewrite rule?

How can I stop PhpStorm optimizing imports when reformatting code?

OK, I've scoured the internet trying to figure out which bit I have to change in PhpStorm to make it stop doing this.
Right now when I run "reformat code" on some PHP, it also decides to optimize imports for me. While normally I'd say "gee, that's great" - in some cases PhpStorm doesn't recognize that some of the imports it thinks are unused are, in fact, actually used.
Comments as code, and all that.
Please tell me someone out there knows how to make PhpStorm stop doing this. It's driving me mad that I have to undo changes to my imports whenever I auto-format my code.
As it turns out, #LazyOne hit the nail on the head in the comments up above. Once I opened the reformat file dialog, all of my problems suddenly went away.
Very obscurely hidden setting, since it's not something easy to find in general preferences :-)
Mac users can use keyboard shortcut: ⌥⇧⌘L
This available to all Jetbrains products.

Library with identifier LabelServices is missing (perhaps it was deleted?) / Something went wrong. Please reload

I have posted this on google-apps-script-issues (https://code.google.com/p/google-apps-script-issues/issues/detail?id=4723&can=4&colspec=Stars%20Opened%20ID%20Type%20Status%20Summary%20Component%20Owner) but with no response I am getting desperate as all my sheets and scripts are breaking down. So I hope someone here might have encountered this and have some idea for me how to handle this.
Some of my exiting scripts (including some in spreadsheets) suddenly started throwing the exception 'Library with identifier LabelServices is missing (perhaps it was deleted?)'.
I tried deleting the library reference in some of the scripts that were throwing this error and re-adding it but the same error comes up. I even defined a new library with the same name and try to use it instead. Still the same error.
Most likely a related error, when trying to open project properties to these scripts I see the message 'Something went wrong. Please reload.' and the hourglass never stops. This happens at both standalone scripts and ones embeded in spreadsheets.
Please note that if I add the same library to a new script then there is no problem and the library works perfectly.
I would like to add that even if I remove the library and also any calls or references to the library the problem still persists.
Link to a script where this happens is available at https://script.google.com/d/1ptevXwu25z9Vo88zX0XOyaQk5pE5MmzwDbb-lMglNY1lzz1HBBiAeJxn/edit?usp=drive_web
You can copy it and play with it. You should get the same problem.
Appreciate any help!!!
Andrew. First of all thank you as you triggered something in my mind. I went all the way bottom up and checked each script and a library it was calling. There were obviously dependencies, however nothing that should have been a problem. a couple of libraries even though in development mode seem to cause a problem. I had to create a new version but it was not enough just to update their version in other scripts. In the calling scripts I had to remove all libraries and re-add them one by one while testing whether the project properties shows up or not. I just wish Google would have a utility to clearly highlight what was wrong because I can't figure it out though I went twice through their documentation in regard to libraries and development mode. Since I have about 30 libraries or so, not to mention spreadsheets and apps it took me nearly a whole day... Thanks again!
To all, it seems that there is a problem where sometimes libraries get out of sync (at least that's the best way I can describe it). You may need to create new versions for the libraries (even though these are in development mode. And in each problematic script remove and re-add the libraries (in at lease a couple of transactions - first remove and confirm then add - and better one at the time while checking that your project properties opens properly). This solved the problem for me.

Sublime Text 2 packages ignored

So after switching over to Sublime Text last year, it has become my editor of choice, and I have installed several different packages via the excellent Package Control and basically customized it all to my liking. After a couple months of infrequent use, I jumped back into a code-intensive project and fired up ST2 only to find that none of my packages are working.
After some digging, it finally occurred to me to open my preferences file, only to find all of my installed packages in the "ignored_packages" list. WTF?
Has anyone else experienced this or know what would have caused this? I do some funny things in my sleep sometimes, but not this!
My earlier comment notwithstanding, I think I've figured out what's going on. The issue seems to be Package Control, most likely the new version update to 2.0. I just restarted ST2 after having it open for the past few days, and happened to have the console (Ctrl`) open, and saw that several of my packages, including Tag, Terminal, and SublimeREPL, were added to the ignored packages list. This typically happens when a package is being updated or removed, and is done so it can't be used halfway through the operation before everything is synced. At any rate, for me there was some sort of error, and I had to force quit Sublime and restart it. I immediately checked my preferences, and sure enough several packages were in the "ignored_packages" array.
So, I'm guessing something like this happened to you, and for whatever reason the packages weren't removed from the ignored list, possibly because the system update didn't complete normally. Hopefully this won't happen again, but if it does you'll know where to look. Additionally, if it does happen again, I'd submit an issue on Github, as this may be a bug.
Update
My issue on Github has been merged into this one, and if you scroll all the way down to the bottom wbond has a fix for now: Download Package Control 2.0.1-beta, put it in your Installed Packages folder (removing the one that's already there), and adding the repository https://sublime.wbond.net/prerelease/packages.json by selecting Preferences -> Package Control -> Add Repository. Restart ST2, and see what happens, especially after restarting multiple times. If you still have bugs or odd behavior, please add to the issue.
I am adding this even if it's an old thread because the answer did not solved my problem, but it pointed me in the right direction.
Since it was a problem due to Package Control trying to update packages and I didn't want to mess with repos and stuff, first I tried to upgrade the packages "manually" using Package Control and I noticed that there was a 1-to-1 match between the items in the ignored_packages array and the packages that needed to be upgraded.
After updating, just remove the packages from the array and restart ST2: no more weird ignored packages in the array.

Netbeans 6.1 Debugger stopped working with error com.sun.jdi.InternalException: Unexpected JDWP Error: 502

I have been using Netbeans 6.1 for a long time and my debugger has always been flawless. Somehow recently (within the last two weeks or so) my debugger stops at breakpoints but it either freezes most of the time or i can't find out the value of any variable, my local variables wont expand and my watches will sometimes show all nulls even for this.hashCode() or not even update at all and freeze.
When this happens i see the following netbeans exceptions
com.sun.jdi.InternalException: Unexpected JDWP Error: 502
at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:379)
at org.netbeans.modules.debugger.jpda.expr.TreeEvaluator.invokeVirtual(TreeEvaluator.java:164)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:844)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.invokeMethod(AbstractObjectVariable.java:417)
at org.netbeans.modules.debugger.jpda.ui.models.JavaVariablesFilter.getChildren(JavaVariablesFilter.java:133)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilter.getChildren(VariablesTreeModelFilter.java:193)
at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:628)
at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildren(Models.java:2819)
at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:701)
at org.netbeans.modules.viewmodel.TreeModelNode$LazyEvaluator.run(TreeModelNode.java:1124)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
com.sun.jdi.InternalException: Unexpected JDWP Error: 502
at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:379)
at org.netbeans.modules.debugger.jpda.expr.TreeEvaluator.invokeVirtual(TreeEvaluator.java:164)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:844)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:315)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:285)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel.getLimitedToString(VariablesNodeModel.java:316)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel.getShortDescriptionSynch(VariablesNodeModel.java:275)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel$1.run(VariablesNodeModel.java:233)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Does anybody know how to fix or workaround this problem? I have googled this exception but can't find anything of value. The only thing i found is about running two different JVMs, one to debug and one to run the application (but this is not the case for me, both JVMs are the exact same version "1.4.2_03"). I am running into this issue at work so upgrading Java or my IDE is not an option, though it this was fixed in a newer version of the IDE i would still like to know that but most importantly I really need a fix or workaround for this. I have also not changed any settings in my project or NetBeans that i am aware of from the time my debugger was working to now.
Thanks
Append: I also got the following message
A com.sun.jdi.InternalException exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your C:\Documents and Settings\default.netbeans\6.1\var\log folder.
And i have a copy of messages.log if anyone wants me to post it.
I also tried debugging with a different project that i haven't used in a while and it still failed in the same way.
I could really use some help on this one.
It's probably issue # 136461. If the software update(s) for 6.1 do not fix it, then you're probably out of luck. NB 6.1 is over 2 years old at this point.
I understand the desire to keep all developers on the same IDE release. A change to a .form file or a nbproject file can spoil an unwary developer's day.
However, can you install a personal copy of 6.9 and just use it for debugging? Keep the 6.1 around to verify everything before committing.