views:

544

answers:

14

I can't find another topic where this has already been asked, so I'm starting one... if there is one, feel free to link it and close this.

What feature do you feel is most missing from Visual C++?

Microsoft has been adding nice features for C#/VB.NET development for the last couple versions, but C++ has felt a bit neglected. I don't have much experience with other IDE's, but there must be some advances in C++ IDE development in the last five years that people like. I'm very curious what people think are the most glaring lacking features missing from Visual C++.

Notes:

  • No, I don't work for MS, I just use their stuff a lot, and want to see it get better
  • This is specific to native C++ development, although I suppose C++/CLI should be fair game too
  • Feel free to add multiple features as separate entries; that way people can vote up things they find the most lacking
+12  A: 

Refactoring.

JesperE
Visual Assist X offers C++ refactoring that is pretty decent, but it is no where near as complete as what you might find in Resharper or what any Java IDE provides. (Default C# and VB refactoring that comes with VS blows as we all know...)
Raindog
I can't believe Whole Tomato raised the price of visual assist up to $250, that is about what Visual Studio Standard runs....
Dolphin
A: 

One thing I think VC++ desperately needs:

  • A step-through capability

There's a step over capability available through the undocumented NativeDE subkey (google the subkey name to read about it), which is very useful for trivial constructors/etc. However, with boost, TR1, COM abstractions, and other multi-step pass-through code becoming more common, VC++ really could use the ability to step through functions automatically in the debugger. Note that this exists for C# as an attribute already, but it's needed for native C++ IMHO, and as a documented, supported capability.

Nick
Why not set breakpoints on the code after the code you want to step through?
Raindog
+5  A: 

This isn't IDE related, but language related. I wish MS would support at least a few of the C99 changes. Specifically:

  • stdint.h and inttypes.h. I have my own versions so it's not a big deal for me, but MS really should have put these in a long time ago. They require absolutely no changes to the compiler.
  • mixed declarations/code and inline in C. They already have to do this for C++ why not let me do it in C?
  • _Pragma(). They already do something very similar (_pragma() I think), but it's different enough that it needs #ifdefs to work.
Michael Burr
+1 for stdint.h, the other ones, not so much
Dolphin
+2  A: 

If multiple expressions (separated by sequence points) exist on a single line, then allow stepping through the individual statements one at a time. Example: in a for loop, step through the initialization & comparison as two separate statements (on first pass) and the comparison and increment as two separate statements (on subsequent passes) .

Stepping through macros.

Kevin
It does. F11 steps into a statement if they are function calls at least.
Raindog
A: 

In addition to stepping through macros, I wonder if anyone thinks that eventually the compiler will need to support a step through template expansion capability? With meta programming becoming more standard, and templates becoming more complex and compile-time evaluated, this could become an issue.

Nick
+8  A: 

I seem to be one of the very few people on earth using this, but I would really love if Microsoft would implement the keywords and, or and not correctly in both their compiler and the IDE – in fact, all of the ISO 646 but these three are the only ones that are really useful.

They have a lot of “good” excuses for not implementing them – not a breaking bug, not many people use them, yadda yadda yadda – but it's such a small thing and it seems so careless of them not to implement it just out of spite.

… for people who don't know what I'm talking about:

// This is valid C++
bool x = not (a and b) or c;

// … and is equivalent to this:
bool x = ! (a && b) || c;

The keywords are also defined as macros in the standards header ciso646 for compilers that don't support the above code right away but standards-compliant compilers must support this code.

Konrad Rudolph
Wow--that's a new one on me. Cool answer Konrad. Upvoted.
Onorio Catenacci
I might be with MS on this one: it seems like something easily done in macros rather than hardcoded into the compiler. Regardless, though, it's a good suggestion for people to evaluate. :)
Nick
@Nick: the standard says they are keywords, therefore hey can't be macros. Personally I disagree with the need for them to be keywords, but standards compliance is a good thing.
Evan Teran
@konrad: that's exactly what i want to use too.Sucks they haven't implemented it.
gogole
+2  A: 

Since we're dreaming... and you mentioned Template Meta Programming (TMP), it would be killer if there was a TMP debugger ;)

ceretullis
A: 

Another thing I'd like, personally, is the class graph display like the one which is possible for .NET languages. I think it would definitely help with visualizing new code projects which you're trying to visualize.

Nick
+2  A: 

If I declare a set of functions in a header file, with just one click all the functions should automatically be expanded into its .cpp file. Or vice versa. I am not sure if there is a macro for this already.

goths
Along the same lines, I'd like it to be able to suggest the appropriate header file include to add to remediate the selected undefined symbol.
Nick
+2  A: 

Autogeneration of code, getters/setters etc, much like IntelliJ IDEA for Java has.

EDIT: And also addition of pretty much everything that's currently supplied by Visual Assist X. That thing is an absolutely necessity for working in Visual C++.

korona
A: 

Thought of another thing I personally want:

The ability to break on a function by name, no matter where it is called from, or where it is defined.

It's easy enough to break on functions in your code, but often I find myself wanting to break on functions which I don't have the source code for (eg: OS API functions), and it's infeasible to track down every instance in my code and library code where the function is called. VS has the ability to break on a function, but it doesn't seem to work for functions which are not in your code.

Nick
A: 

Being able to set the priority of the compile threads.

Tim
A: 

It would be nice if Intellisense got finally fixed. My VS 2008 freezes for 10+ minutes when I RIGHT CLICK anywhere in the code window. C#/VB.NET get all the Intellisense love - not the case with C++ ....

Filip
A: 

The Visual C++ compiler is missing support for the register keyword. It simply ignores it.

In the hotspot(s) of your application it is important to be able to direct the compiler to do the right thing.

Or as James Pratt put it:

"The REGISTER keyword is ignored. This is critical to producing fast code because the compiler does not always choose the right variables to keep in register."

The register keyword is a powerful tool that can be abused and can hurt portability, but I think it should be supported.

For some reason Microsoft will not allow us this level of control. The main argument is that the compiler is smarter than the software engineer. This is simply not true in all cases. If Metroworks had used the same argument for their C++ compiler for the PowerPC/Macintosh I would not have been able to speed up my user-facing application by a factor of 2 (from 4 seconds to 2 seconds for the main operation) just by assigning the important variables to registers, eliminating main memory accesses. This took just one hour to do, directed by disassembly of the generated code and eliminating memory accesses.

Peter Mortensen
In all fairness to Microsoft, your argument is compiler-specific, and may not apply to the MSVC compiler. Unless you have counter-examples specific to the MSVC compiler, I'd be somewhat inclined to believe MS; after all, several very competent software engineers have stopped writing optimized assembly for their performance-critical sections when using MSVC, because (in their estimation) they can't reliably do better than the compiler.
Nick
Note that I'm not saying you're wrong, or your suggestion is not valid, just that the example given to justify it is not particularly applicable, and you may want to investigate further if this feature would really actually help you.
Nick
The same code also runs on Windows so I could write x86 assembly code to try to beat the MSCV compiler. This should be fairly simple as it is only a 3 lines of C and perhaps 10 CPU op- codes. But I have not written assembly programs since the ZX Spectrum/Z80 days - does some other C++ compiler exist for Windows that honour the register keyword? GCC? C code (bit_0 and endpos are constants in the loop - typically several hundreds iterations): [ cv = pCharactVectorTable[*p++]; R = (((R>>1) | bit_0)
Peter Mortensen