Is there some way to filter what files Visual Studio 2005 (C++) steps into?
For example, when stepping into
SomeFn( a.c_str(), b.c_str(), etc );
I hate how it steps into the standard template library files for c_str() - instead I just want to go into SomeFn().
If there was some way to filter out any source files didn't live in the same path as the solution file that would make my life easier.
Does anyone know a way? Thanks
This article describes how to solve it for VC6, VC7 and VC8.
I don't know if it's in VS2005 or not (I no longer have 2005 it installed on my machine), but VS2008 has a context menu item in the debugger when you right click: "Step Into Specific"
That option will let you choose which function to step into.
The approach in VS9 is very similar to the VS8-approach described by Kirill. More details at ffuts.org
Related
Problem is the same as here:
Visual Studio 2017 - Not Able to see Publish - Missing Profile / Deployment Options
https://developercommunity.visualstudio.com/content/problem/129404/missing-publish-menu-in-netcore-web-project-right.html
except the fact that I didn't see the button earlier (I've started coding in Visual Studio just recently). I've installed some packages, which were adviced in mentioned topics, like "Azure" and "ASP.NET", but it didn't solve the problem. I don't understand, how it could help (I code on C++ and have not to use these packages, do I?) and what exactly I should do (maybe I've downloaded something wrong).
Thank you in advance!
Update
If I understand right, there is no way to "publish" C++ code, according to:
https://social.msdn.microsoft.com/Forums/en-US/6998eadb-36fb-4a97-bba5-0de49d533732/how-can-i-publish-a-visual-c-project-?forum=vsclassdesigner
Then, how to make standalone exe-file, that doesn't require something other like .pdb, .ipdb and .iobj and can be run on another coumputer without Visual Studio?
The command that creates the binary is called "Build".
I can't say for sure, but I think that "Debug" builds to run on another computer need vcredist, while "Release" builds can run without anything else. Again, I am not sure.
Seems to be missing as a file type in new files, do I need to add some kind of extension or something? I know I can create .cpp files but I'm not sure how to build and run them with the gcc once I do. Documentation seems to be difficult to find, as the web is cluttered with VSCode docs, and VS for Windows docs.
Edit
I know you normally select it as a solution type. It is not available as a solution type.
I'm not really sure why people voted this down. The correct answer is no, you cannot create or run c++ projects in Visual Studio for macOS beta at this time.
I have a .EXE file which I need to debug using VCEXPRESS using the code in an existing Visual Studio solution (.sln). Basically I trying to do something like this:
VCEXPRESS.EXE program.exe -use project.sln
I know I can do this
VCEXPRESS.EXE program.exe code.cpp
But then I may not be able to navigate through the whole code as VCEXPRESS only sees code.cpp. and also the .exe file contains the code in the solution plus some extra code. Is there is a way to achieve what I am trying or anything similar to it?
I would really appreciate your help.
I debug it using different VS versions. One workaround I could think of is using the /DebugExe, but it doesn't work if I use the Express version since it has many limitations in command line.
https://msdn.microsoft.com/en-us/library/ms241274.aspx
But if I use the VS2015 community version which was also free in command line, I could debug the specified executable file. Would you please use the high VS version like the community which is also free and it has much more features than express version.
If I have misunderstood this issue, please feel free to let me know.
I solved it. The solution is to open the VS solution and use visual studio commands to add the .exe file as an existing project. It will be something like this
VCEXPRESS.EXE solution.sln /COMMAND "File.AddExistingProject program.exe"
You can also open a source code file like this
VCEXPRESS.EXE solution.sln code.cpp /COMMAND "File.AddExistingProject program.exe"
This will open the solution and code.cpp in the editor, then add program.exe as an existing project and allows you to debug it.
I hope someone in the future finds this answer useful.
I know that VS 2008 Team Edition has a profiler, but I'm also aware of the recent trend they have at Microsoft of completely ignoring unmanaged languages (what's the last time unmanaged C++ got something cool in the IDE?!).. For example I know for a fact that the IDE "Unit Tests" and "Code Metrics" features don't work with unmanaged code.
I tried to google but didn't find any info; so, does anyone know if it works or not?
Yes, it works with native code.
Well I tried it and it does not produce any useful info. For example, in the "Functions" view the source file name is shown as for everything. And yes I am building the release version and have turned on debug info (tried both /Z7 and /Zi). I also tried both Instrumentation and Sampling methods with the same (non) results.
My previous comment last something as stuff in < > was lost. Source files are shown as "Unknown" and I can only see the relative time in each module. This is not a lot of use. How do I get decent output? (Give me TrueTime for VS2008!!)
Coming from a different development environment (Java, mostly) I'm trying to make analogies to habits I'm used to.
I'm working with a C++ project in Visual Studio 2005, the project takes ~10 minutes to compile after changes. It seems odd that if I make a small syntactical error, I need to wait a few good minutes to get a feedback on that from the compiler, when running the entire project build.
Eclipse gave me the habit that if I make some small change I will immediately get a compiler error with an underline showing the error. Seems reasonable enough that VS should be able to do this.
Is this something I can enable in VS or do I need an external plug-in for this?
The feature you are asking for will be available in Visual Studio 2010. Here is a detailed link of the feature details that will be available.
For now, as others have suggested, you can use Visual Assist which can help a little bit.
These are called Squiggles BTW.
You can try the following:
install a plugin like Visual Assist: it will notify you about most of the errors;
if you want to check yourself, use Ctrl-F7 to compile the file you are currently editing - in such case, you will not need to wait for all project to compile. If you are editing a header file, compile one of the .cpp files it is included in.
Yes, C++ is notorious for its build times. Visual Studio cannot perform on-the-fly syntax checking (in case of C++), but you can install Visual Assist to help with that:
(source: wholetomato.com)
10 minutes is quite a long time to wait, are you doing a full build every time? There are a lot of techniques you can use to speed this up, for example using precompiled headers. I try to organise my code so that I do all of my significant changes in the code file instead of the header, then just do a build of that one file (ctrl F7) to check for errors.
You have the "error list window" that will list your errors and warnings after compilation. If you double click on the error it will directly go to the problematic line of code in your source. It's in the menu Display, sub menu "Other windows".
Keep in mind that compiling C++ is a much more difficult task than compiling Java, which explains the increased time.
Visual Assist X is very cool but only detects typos.
It cannot be compiled "on the fly" which explain the feature you ask is not possible. If you have a multicore machine, you can enable parallel building.
Tools -> Options -> Projects and solutions -> Generate and Execute -> maximum number of parallel compilation.
Resharper for C# has it. But for c++, maybe visual assist x ?
Eclipse gave me the habit that if I make some small change I will immediately get a compiler error with an underline showing the error. Seems reasonable enough that VS should be able to do this.
Eclipse has implemented their own Java compiler, and run that in the background every time you type a word to be able to detect and underline errors. I don't know if I'd call that "reasonable". ;)
It's a lot of work to implement that feature, even in a simple language like Java.
In C++, where, as you've discovered, compiles may take minutes, it's harder still.
Visual Studio 2010 is going to implement this feature (again, using a separate compiler, which is much stripped down, and won't always provide correct results -- that's the compromise necessary to ensure that it's fast enough to compile on the fly).