Visual Studio 2010: Editor stops responding to keyboard - css

I've got this very odd bug that appears to be a quirk in Visual Studio 2010: Sometimes, when moving the cursor into double quotes of a CSS style="" attribute the cursor refuses to move. I can't type anything, and the keys that respond are the UP/DOWN cursor keys and the DEL key (but not BACKSPACE).
Typing does nothing, but pushing LEFT/RIGHT on the cursor keys produces the following error:
The operation could not be completed
I've got no idea what's causing this, but I would hazard a guess that Intellisense is getting very confused and bugging out.
At the moment, whenever this happens, I have to write any CSS outsite of the double quotes of the style attribute and then place the cursor where I want the CSS to appear (using the mouse) and press CTRL-V to paste it in. Very annoying :(
There must be a way of fixing this problem...?
Hopefully someone has an answer!

Just encountered the issue in VS 2012, in editing C#.
I noticed that the problem had occurred soon after the trial period of Resharper has ended and i inserted a valid license number. It also happened in only some of the source files.
The solution: Tools->Options->Resharper: Suspend.
Try typing - should work now.
Then: Tools->Options->Resharper: Resume.
Problem gone.

I have encountered this using Visual Studio 2013 and Resharper 8.2.1. None of the solutions provided in this thread worked (even suspending and resuming Resharper)
After contacting JetBrains support, it turned out to be a caching issue.
Deleting all the files from the following directory solved the issue, as Resharper re-creates new caches:
C:\Users\[Username]\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\[Project_reference]

I have some odd issues with the editor occasionally, a workaround for me is:
Ctrl-Tab (x2) to another code file and back to the same code (or alt tab to another app and back, one of these two... can't replicate issue to be sure)
An ultimate solution might be a re-install.

Microsoft have had variations on this problem reported quite a few times via their support portal. Here is one post and if you scroll down you will see a comment with a bunch of other reports all detailing similar(ish) problems.
Microsoft doesn't seem to be able to reproduce the problem but are "duping all the similar keyboard locking problems to a central bug, so that we can think a way to log the events if necessary". Which seems to be a generic response to a lot of these posts. Some people reported that it was simply becuase another window/pane/tab was in focus but I can see the OP obviously did not have this specific problem. Looks to me like one of those random unresolvable bugs. Hope I never get it! There's also numerous forum posts around the Internet, where users stated that removing certain 3rd party plugins has solved this issue.
I just spotted this particular post which has a possibly useful comment on it for you (which also link to this SO post. As I do not have the bug I cannot test its validity for you. The main point of it seems to be something about the keyboard layout switching.
I'm sorry for putting all this into an answer when technically it is not an answer and just a mass of research, but there was no way this was gonna fit into a comment. And also sorry for pretty much link spamming, but again there was no way I could extract everything that they said into this post. I hope there is something useful in there for you :)
EDIT: You should probably check the top rated answer below as this seems to solve a number of peoples issues, although I never had the Resharper plugin and still occasionally experienced this, but now I'm on VS2013 and have not had this problem re-occur, so maybe they fixed it...

Empty the solution cache folder
C:\Users\{UserName}\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\
This was suggested by JetBrains support when I contacted them.

Permanently fixing... Not too sure however I found that pressing pressing Ctrl+Shift+Caps Lock+Tab all at once seems to get rid of this and enables the mouse and keyboard again. I know this isn't the best of solutions but it works.

I have the same problem several times a day. I didn't notice it until I installed the web essentials extension. I just uninstalled it and will see what happens. I have tried reinstalling visual studio with no joy (but again, I didn't notice the problem until after I had already installed the various extensions).
Sometimes, closing and re-opening the specific code window I'm working in fixes it. If that fails, sometimes I close all windows and reopen just the one I was actively editing. If all of that fails it usually requires a complete restart of visual studio.
I find it funny that MSFT says that they can't duplicate the problem. Scott Guthrie experienced it first hand during his MVC4 beta demo here at about 28 minutes in.
UPDATE: So far, as of 4-5-2012 9:33am Central Time, the problem hasn't recurred since uninstalling Web Essentials. This is the longest I've gone without this bug occurring. If I make it through the next 24 hours, I'll be confident in blaming Web Essentials.
UPDATE: 4-6-2012 10:05am Central Time: Well, apparently it wasn't Web Essentials. It happened to me again this morning editing the contents of a block in my _Layout.vbhtml file. Closing the tab and reopening it fixed it.

I frequently encounter this editor freeze, not just on CSS quotes but any file arbitrarily. I have a dual monitor setp and I have the doucment windows one one monitor and all tool windows on the next one. Sometimes, certain tool windows would freeze too (i.e. not respond to click).
Previously, I used to shutdown/restart IDE; but serendipitously, I discovered that switching to/from Full Screen mode, restores sanity. So now everytme I see a freeze, mode switching comes to rescue.
Not sure if this will solve your issue, but worth a shot.
Rant: In general, I find this new WPF based product very falky and unstable than its predeccessors.

I have the same problem on IDE, some times the Return key is not working at all...
My solution is: CLEAN the project/solution.
BTW: CLEANing resolve also other unexpected behaviours after amendements on CSS or HTML.

I tried every other workaround here but nothing seemed to work, and the issue was only present in one solution but not another.
Disabling Resharper fixed it temporarily but it came back after re-enabling it which wasn't a viable long-term solution.
What worked for me was disabling all Resharper Extensions (Under Resharper -> Extension Manager). I was able to type again even after re-enabling all of them, so I'm unsure which extension specifically caused the issue, but that's another route to try for people who still have this issue.

I never had the problem until I installed plugins/extensions. Curious to know if anyone has had this problem without having any plugins/extensions installed. I don't know if they are the actual cause but since benefits of the plugins outweigh the occasional lockup, I have left them installed. BTW, I use the "closing/reopening of the window with the lockup" technique.

Using a source control (GIT, AKSVN)? If so, disable it, restart VS then enable it and open the solution again.

Related

Eclipse CSS Editor "Unknown property" after LESS nature mess

I'm done with googleing, I have to ask you folks...
I have a static web project (not JavaFX, thus no JavaFX toolkits!) in Eclipse Kepler. Now thats the messy road I went:
I created a .less file (for the first time)
Eclipse starts nagging with the "Do you want to add the LESS-project nature?"-popup
I clicked 'no' 10 times (pops up every time I start Eclipse)
then I clicked 'yes' to add the nature for making this stop (could not find ANY workaround for that #$%!+"* !)
Now I face this travesty:
The built in CSS-editor marks every trivial property as unknown. I have no clue how to fix this. I removed the less-nature and restored my old .project file too but the warnings (and even real errors) persist. I found out that rewriting the properties does not summon these warnings!
No, I won't rewrite ~6000 lines of css...
Please help. Please make it stop...
Sorry, found the solution (dumb as can be):
delete project (only!) in Eclipse
re-import project (which completely revalidates the project structure)
errors are gone...
Although this solved my problem, I feel uneasy about the fact that I could not find any possibility to do a complete re-validation without to delete and re-import my project. This is pretty nasty...
Right click project Configure->Remove LESS nature.

Grails: Images / CSS missing from time to time

While developing a website I experience a weird bug.
From time to time my images or my css are missing.
It's not really predictable and therefore not reproducible.
Usually it happens after I edit my css, save it and reload the page (in the browser).
It's always syntactical correct CSS, so no compilation erros or anything similar.
I think it's the way Grails updates the running application, but I really can't say why or where it happens as it is quite rarely, but definitely annoying.
It doesn't matter if I run the application with my IDE (IntelliJ 9.0.4) or with the commandline (Windows).
The only thing I did not test so far is whether it happens only when I use the IDE or not.
Did anyone experience this?
EDIT:
Sorry for an unclear description:
"missing" means the browser is unable to load the corresponding ressource: "The Ressource () is not available"
Another Edit:
Thanks for the comments so far.
In addition to my main css-file and my images, which change quite frequently, my reset-css-file disappeared. I never touched it since creation, so I think one can exclude the compilation-script as cause of this mess. (further info in the comments)
Like John Smith I arrived here googling for this problem.
But I found another solution, and i hope that it helps you too.
I googled a little bit more and found this discussion Disabling static resource stuff, here i found a contributor of grails application, and author of Resources Plugin, Mark Palmer (take a look his website), telling what he is doing and answering the questions about this plugin.
Today, all you need to do is to update the Resources Plugin to version 1.2-RC1 or a recent one that will fix this problem.
When you say missing, do you mean that the changes are missing, or the whole stylesheet is missing? If it is just your latest changes, it is possible that your browser is caching the previous css file and isn't getting the latest changes. Try doing a "hard refresh" with something like CTRL+F5, or whatever hard refresh is in the browser that you are using. This will force a pull of the latest resources.
Really old question.. but for anybody googling this - I had similar issues with my CSS because of Windows file format on the Linux systems. Once I changed the format to unix, I still had to restart the server for the css to download. Note that somehow the css were downloading earlier although the format was windows and the issue was intermittent.

Asp.Net Menu not rendering for only one developer

We have an ASP.Net menu that works fine for everyone except for one developer.
We verified that the source code on his machine is identical to everyone else's. We checked the generated HTML and verified that it is not a display problem. We stepped through the code and made sure that the menu control was set to visible in PreRender.
The really strange thing is that this problem has only been occurring for him in three separate branches. Yet this problem has never been reported in QA or production. We also checked/verified that this problem occurs across all three major browsers.
We cannot show you our code due to the nature of this application. If anyone has ever experienced a similar problem or knows a resolution we appreciate your help.
It sounds like the dev workstation is polluted in some way. Either there's something cached or a system setting somewhere preventing this.
I'd say that if this problem can't be reproduced on any other machine/VM/customer, then don't worry about it.
Have you distilled the problem with a sample app/menu, or is it just in that one particular application?

XCode 4 breakpoints not breaking at correct line

My breakpoints have stopped working properly in the latest XCode 4 release. With no change to the project settings, the breakpoints no longer break at the line they are set.
For instance, in one function I can set a breakpoint anywhere within it's body, but the code will always break at the last line of the function.
In another instance, I can set a breakpoint anywhere in one function and the code will break at a line in the middle of a different function in the same file! Tracing through after the break shows that it did break in the wrong place and it's not just a file / debugger sync issue.
I have no idea why this has started. It did however seem to start on new breakpoints while old ones worked. Any new breakpoints I add break in the wrong place. And recently, some files now don't even break at all! I can only assume the breakpoint is so wrong it's moved into code that's not called. I have done numerous internet searches and forum searches for this problem, and although I have found people with similar issues, there was either no solution or the solution listed (rebooting device, swapping debug output, turning off optimization etc.) haven't worked for me.
It is worth mentioninig I'm mostly coding in C++ using .mm files. For the past year of development in XCode 3, and for the last few months in XCode 4 things have been fine! I have debug set up correctly. No optimization on a debug run, no dead code stripping and I'm using the LLVM compiler 2.0 with DWARD with dSYM debug file. However, changing these values makes no difference.
Please help, it's driving me mad!!
An update to this. It's started happening again on a brand new machine with a fresh Lion and xcode install. The whole editor is out of whack. Example below of the errors appearing on the wrong lines.
From what I've read all around, Xcode tend to get confused with breakpoints and the way to get rid of the out-of-sync problem is to clean the "Derived Data"; two ways of cleaning it so far I've found (instructions are valid for Xcode 4.x) :
a) go in the organiser, under the Projects, choose your project and hit that delete on the Derived Data
or
b) go in the Product menu, hold the ALT button on the keyboard and observe that the menu are changing... so the clean transform to "Clean Build Folder..."
With-in "Build Settings" under the project target change the "Optimization Level" for "Debug" to "None".
I found that this fixed the issue for me.
I have fixed this, although I haven't found the root cause.
I removed the references from the project for the files that were not working with breakpoints. I then did a full clean and went into the folders and deleted any build and temporary data. I then opened the project bundle and deleted all data except for the project file itself. I then compiled so it threw up errors due to the missing files. I then put the files back in the project.
Now, the exact same files work fine with breakpoints!
No idea why but happy it's fixed.
Have you cleaned your targets? Shift-Cmd-K.
This started happening to me after I upgraded to XCode 4. I just deleted all breakpoints, did a clean, then re-added my breakpoints. Seems to work OK now.
I have figured out why this happens now. As mentioned in one of the replies you can fix it by deleting the derived data. This will always fix the problem. The editor for some reason loses it's relationship between the source code and the markup of the code it uses to cross reference breakpoints and errors etc. Deleting the derived data forces it to recreate this.
I believe that this only happens with files using C or C++ code. Apple seem to ignore C++ developers on iOS. I know a lot of professional game developers and every single one uses C++ to write games. Apple's lack of support is annoying.

FlashDevelop (Flex/AS3) and localized compiler messages

I am completely new to the whole FlashDevelop/Flash/etc toolchain, but wanted to do some experimenting. I installed FlashDevelop and Flex SDK on my laptop, and thinks worked out just fine, except for one thing: the compiler messages are localized!
Messages like "gebruik van een niet-gedefinieerde eigenschap" (Dutch.. sort of) are limiting my productivity. I don't recognize them because they look nothing like what I'm used to in any other programming environment, as a proper sentence they make even less sense than English error messages, and I certainly can't google them properly.
Now I've already seen there are a couple of xml files and java/mxmlc/fcsh/etc configs I can tweak, but nothing so far helped.
Please help me restore sanity and en_US/1033/etc! Thanks...
Edit Setting my windows locale to English through the control panel, then restarting FlashDevelop, did result in English error messages from Flex. So hurray, I've got a usable workaround. I'd still like the two to be unrelated though, as a developer a fiddle with those settings all the time.
Modify jvm.config file located in the same folder as your mxmlc.exe
by adding on java.args line the following option:
-Duser.language=en -Duser.region=US
Detailed explanation is here.
Goto Tools | Program Settings (press F10) and select Flash Develop from the left panel. Scroll down to the Misc heading - the last option is Selected Locale. If en_US is not there, then you have a problem - you might have to download the correct locale version again.
Setting my windows locale to English through the control panel, then restarting FlashDevelop, did result in English error messages from Flex.
I someone comes up with a better solution, I'll gladly accept that answer in stead of this one...

Resources