Visual Studio 2010 data tip for conditional statements - visual-studio-2010

I just noticed an strange regression when debugging using vs.net 2010.
Suppose I have the following code:
int a = 1;
int b = 2;
if (a > b)
;
When debugging under visual studio 2008, if I mouse over the a variable, it would show me the value. The same for the variable b. The mind blowing feature to me was that if I mouse over the ">" operator, it would show me the result of the "a > b" expression. This is awesome!
The problem I'm having now is that it doesn't work anymore on visual studio 2010. Is this intended or is there any configuration I should do to make it work?
Thanks in advance for any hint.

It looks like the problem with Data Tips (hovering over expressions stuff) was fixed with SP1 in VS2010. Maybe you have an outdated version? I hope this helps: http://social.msdn.microsoft.com/Forums/en-US/5e545b9d-36c4-45e4-8a65-b57b7dcadb24/visual-studio-2010-data-tips-are-broken?forum=debuggercanvas

Related

F# Intellisense in Visual Studio for Mac

Autocomplete and intellisense is TERRIBLE for visual studio for mac. It will literally autocomplete random objects in the middle of strings and will not work at all when in the middle of a function that doesn't have a valid return value yet (in for or let statements). I had to turn it off because it's way worse than being useless. Anyone have any tips on how to fix this or should I change IDE's? Or is this a problem unique to myself. For reference I am in a script file.
I would highly recommend Visual Studio Code with Ionide extension installed.

Intellisense not working in VS 2013 community edition

I have installed VS 2013 community edition. It seems that the intellisense is not working properly. Nothing happens on pressing "tab" key. I have to explicitly press "ctrl + space" keys to get the intellisense working. Anyone else facing similar issues?
This might solve the issue for you:
go to Tools >> Options >> Text Editor >> All Languages >> General and make sure that both Auto list members and Parameter information are checked (not the half-checked/square state).
Soruce: http://omegacoder.com/?p=1008

int number; number.m_value?

Today my Visual studio couldn't help me by auto complete so I thought that the ReSharper trial period had ended .After I suspended ReSharper I see that still no auto complete. After a few changes I see still the same problem and there are some strange behavior in Visual Studio. For example I see m_value field for int. But my other Visual studio instances works as expected. How can I fix this problem?
Probably there is an error somewhere in your code which is causing the types to be determined incorrectly - for example a missing curly brace. Check your code carefully for errors. Make sure that your code compiles correctly.
PS: You don't need ReSharper to get autocompletion. Intellisense is a standard feature of Visual Studio. Even without ReSharper I find the built-in autocompletion extremely usable.
IntelliSense is Microsoft's implementation of autocompletion, best known for its use in the Microsoft Visual Studio integrated development environment.
The file property build action was content and this was reason of those strange behaviours. It is fixed after turned build action to compile.

Why would Visual Studio 2010 say it can't show a variable during debug?

In Visual Studio 2010 sometimes when I want to get the value of a variable while debugging, it tells me that it "does not exist in this context" when it obviously does.
I have found that if I use the variable, as in the screenshot below, then it is able to show it.
Has anyone experienced this? Visual Studio 2008 never did this.
How can I get Visual Studio 2010 to always show me variable values while debugging?
alt text http://www.deviantsart.com/upload/jcnr1s.png
Hazarding a guess..
Could it be that your running in Release mode and the variable has been optimized out? Once you actually use the value, then it no longer can optimize the value out?
Is GetListOfFileNames() deferring execution? Try tacking .ToList() on it.

Conditional Debug on Visual C++ 2008 Express

Is there a way to debug code on Visual C++ 2008 Express, such as I can watch a variable for certain value(s) and, when it assumes this value, to break?
For instance, I want to break when xbecomes 5. In gdb I would set a breakpoint then a condition that x == 5. How can I do it (if possible) on Visual C++ 2008 Express?
Although built in support for it is missing in the express editions, there is another way around it.
I found this on another answer for a similar question.
#if DEBUG
if( node.Name == "Book" )
System.Diagnostics.Debugger.Break();
#endif
The example shows that if the Name property matches "Book", a breakpoint occurs.
Here is the original question:
How Do I: Create a Breakpoint Using Conditions? [C# Express]
This is not possible in the Express versions of Visual Studio. But it is possible in the full versions.
It seems it's possible to do this even in express, at least here it worked. After marking the breakpoint, I right-clicked on its mark, and set a "Condition" (it couldn't be easier than that)
!Setting a condition
Then you can write an expression which evaluates to true. My colleague who has just showed this to me said they have some issues using this for comparing strings, but it's pretty neat for simple comparisons using ints.
!Condition window
However, as said in the other answer, this is not so fast as typing the break code directly.
Lucky! Visual Studio 2010 Express of C/C++ does support it. See How to: Specify a Breakpoint Condition.
I've tried it.

Resources