Intellisense Problem

I have a problem with the autocomplete feature of Visual Studio 2005.

When I use VS2005 for an extended period of time the code editor starts to behave very strange. When I'm writing code it starts to autocomplete my code when it should not.

Example, if I want to write:

Dim sName as String it can ends in:

d(ims) nameas String
Dim s(name) as string
Dim sn(ameas) string
etc.

As it was loosing focus and it autocompletes while I'm writing (I write very fast and it is the same). It is very messy and I end up writing the code in notepad and copy/pasting in VS.

I have win2003 and VS RTM 050727-4200

Any one have this problem


Answer this question

Intellisense Problem

  • Charlie Calvert MSFT

    Is there any way you can email me enough of your solution/project for me to repro

    The hourglass/regular cursor implies that some background/helper thread is capturing the focus and thus causing intellisense to kick in. I helped with a similar problem way back when in the VBA Intellisense engine. All this sounds so familiar.

    I would love to help.

    Also, I think Matt has something up his sleeve.

    Let me know if there is anything I can do.



  • Markx3

    Please forgive my ignorance. I'm pretty proficient in VB.NET, and I'm trying to expand my knowledge into C# and C++.. however, I'm experiencing a few difficulties with C++ 2005 Express. Mainly, the autocomplete/intellisense features.

    Just for an example I will use a simple close method in VB.NET.

    Me.Close()

    For this, I could type me.close ... and hit enter. The parenthesis would auto-populate, and it would auto-capitalize the appropriate letters. The program would compile with no problems. I know the statement in C++ is:

    Close();

    ... however, if I type close(); and hit enter, it remains this way, there is no intellisense help.. it does not auto-capitalize the "C", and if I leave the parenthesis out it will not auto-fill them. Furthermore, it will not compile correctly. I was wondering if this is the nature of the language, or if my install is somehow corrupt I read about the .NCB file.. I've tried deleting it and reopening the solution, but the same thing happens(essentially nothing happens). Also when I reference any declared/instanciated variables/controls, it does not match capitalization when moving lines, as VB.NET does.. again, I'm wondering if this is the nature of the beast, or software malfunction

    Again, sorry for my ignorance, it just seems to me that Visual Studio would be able to perform these functions. I would like to believe the software can distinguish between the ambiguity of a declared variable/control and one that has not been. Otherwise, notepad would be just as useful minus the compiler.

    Please help. Thanks!



  • Thawani

    I've seen this problem before, in my case it was caused by a Timer on the form triggering every so often (it was, in fact, every 6 seconds). This would cause my focus to move and thus intellisense would kick in and mangle that line of code to holy-hell.

    To resolve my situation I had to completely stop my code from running before writing new code.

    Your situation sounds similar. Something is making the IDE's text editor loose focus for a split second, and then intellisense does its best to cope with what is written at that exact moment.

    Hope This Helps,

    Brad



  • techmanblues

    I'm having this issue.  I have a windows forms project that I can edit just fine.  But if I "Start Debugging" then exit out I have this behavoir until I restart VS2005.

     

    I have VS2005 Pro installed.  I have some other projects that are just class libraries that do not have this issue.

     

    if I type asdf it comes out as a(s)df.  if I backspace it looks like

    a(s)d -> a(s) -> a(s -> a( -> a()

     

     

    and will not let me backspace past the (...

    1 other developer here is having the same issue. 

    Thanks,

    Jason


  • Neelendra Saran

    j22, edabdoub, and OzMan,

    Could you please send your e-mail addresses to me (Matthew.Gertz AT microsoft.com -- replace "AT" with "@").  I'm going to hook you up with one of my team members who should be able to help you out.

    --Matt--*



  • satya31237

    When this happens to me, it's a lot more often than once every 6 seconds... I can type "Dim" (and I type pretty quick) and it will change "Dim" into "D(i)m"

    then if i hold down the backspace key, it will remove down to the "D" and then put the "(" back.. so repeated backspaces just keep removing the "("..

    for me this only happens when working in a form.. in 2005 that means working in a partial class file that belongs to a form class. ie you have 2 files form1.designer.vb and form1.vb... im working in form1.vb..

    you can "fix" it by exiting visual studio.. exiting and reopening the file you're working on, or just by switching to the designer window and back... I believe it has to be the designer window that belongs to the form you are working on.. switching to an unrelated designer window doesn't work..

    Thanks,
    Jason


    Btw, we have transitioned 6 developers to VS2005 so far, and this happens to all of them.

  • DougP

    C++ is case-sensitive, so the two methods "close()" and "Close()" are different. Or (more common), you could have a member field called close and a method or property called Close, and this would also work just fine.

    Of course, it would be possible to have the intellisense auto-correct things, but that can also be a very annoying thing - consider a person who is using (in C++ and C#) very common pattern of having a property "Foo" with a backing member field as "foo". The order that I sometimes write this is to start with the property and then add the field. If intellisense did the auto-correct of casing, it would happily "fix" my code after having added the property but not yet added the backing field....

    Also, the C++ editor does add a couple of things that Notepad doesn't - intellisense, code coloring and indentation being the most visible ones...

    (just my personal view - I don't work on the C++ team)

    Best regards,
    Johan Stenberg



  • Chinese KongFu

    There is a service pack planned for first half of next year. We’re still discussing what’s going to be in that service pack, so I can’t give particulars as to which issues will be addressed (because, frankly, I don’t know yet). I do actively have members of my team investigating this particular issue right now, but again can’t yet verify if this issue would be resolved in there. (I would certainly like it to be – I truly appreciate how this problem would cripple the editor if you encounter it.)



    By the way, a great way to report and track the progress of issues you’ve encountered is to navigate to http://lab.msdn.microsoft.com/productfeedback/ and enter your feedback there. This automatically generates a report in the issue tracking database that we use daily, and provides our developers with a way to respond to you (get more information, or simply tell you the progress of an investigation). If we already know about the issue (such as in this case), we’ll link your report to that one so that you still stay informed.



    --Matt--*

  • simonw.

    There is another thread on this forum about an apparently chronic problem that one user is encountering along these lines (every keystroke generating parantheses), but I don’t think that’s what you’re running into. I think you’re running into a known issue with the Autosave feature. When Autosave kicks in, you momentarily lose focus form the editor, and the editor interprets any loss of focus as a “commit.” (For example, if you typing something and then click somewhere else on the desktop, you’ll notice that we do the pretty-listing, background compilation, etc.) Most people don’t run into this unless they are typing continuously for long periods of time. This is an issue that we hope to address going forward by having a different message sent to us when the change of focus is due to autosave. (We discovered this problem only too late in the product cycle; I do apologize for the inconvenience.)



    --Matt Gertz--*

    VS Compiler Dev Lead

  • Curtin

    Brad, I have this problem aswell, but not using any timers. I have found it happening on my new VB 2005 forms.

    When d(i)m happens - you can freely type only when the cursor is infront of the (). It surely looks like an intellisense bug. It also make my cursor freakout in form design view after this bug has started. My cursor rapidly blinks between arrow and hourglass.

    To stop this problem in my particular case is to just close the form and it's code window and then re-open it. I have seen another case where shutting down VS IDE was the only resolution - but very rare.

    On some forms this bug begins as soon as you break in to code and then stop the execution.

    I can't believe no-one had found this during the massive beta testing period - I came across this in the first week of developing a new project in VB 2005 (VS2005 Pro).

    I really love the VS 2005 - so much has improved (especially form object binding) - but this bug really spoils the fun of edit-and-continue which was the main reason for upgrading.

    Has any member of Microsoft replicated and acknowleged this bug Will there be a patch soon or is it going to be released in the Q3 service pack

    Also I feel that this bug may be related to this IDE crasher:

    http://forums.microsoft.com/forums/ShowPost.aspx PostID=239022&SiteID=1

    Hope it gets fixed soon - before all hope is lost

    Cheers!


  • shanew1

    The 6 seconds was the Timer's interval, which is (of course) variable. Please follow the standard Tech Support Flow chart here:

    1. If you create a new, blank project....do you see this same behavior

    2. If yes, it is an IDE setting or configuration problem (duh).
    3. If no, something about that project is playing with us.

    Sorry to beat a dead horse, but are there any Timers that are 'started' during debug and then not correctly disposed of (or whatever its called).

    (Please note, any sarcasm or rudeness in the proceding comment is strictly accidental)

    (Please note, the above statement was sarcastic)



  • wiro

    A little more info... If I close all designer windows in this project it doesn't happen.  But then I get no intellisense at all.  When I open a designer window again I get the problem again.

     

    Thanks,

    Jason


  • Kunjal Karamshi

    edabdoub,

    I moved your thread to the VB IDE forum as they should better able to help you here.

    Thanks,

    Dylan

  • andre_durand

    well, I think that it is the same problem that the other user eis experiencing, every letter I write it generates a parenthesis, but that is because the lost of focus..

    when will you release a Service pack Big Smile

  • Intellisense Problem