473,388 Members | 944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How to debug C++ code in Visual Studio 2005

2
Hi,
It should be noticed, I'm not a proff. programmer. I wrote in C++, Pascal, mapple, matlab time by time.
I want to test and debug one math algorithm, so I created new project for it.
Then in the Source file folder I created new cpp file, wrote the code, built the solution. There are no mistakes in code, but when I put some breakpoints to look into variables' values and started debugging, the error have appeared: "No debugging information.Debugging information for 'devenv.eve' connot be found or does not match."
I searched in different forums, but couldn't find any helpful information.
I read the VS help, checked configuration manager (configuration: debug, platform:win32, build:yes), tried again - no result.
1) What should I do to be able to debug simple C++ project?
2) is there any possibility to compile and debug just one file without creating any projects?
3) when and where can I see the results of program's work?
I put some "cout" in the program, but the output window is empty after building the project.

I wil be VERY grateful for any structured advices and references to related forums, articles etc.
Mar 24 '08 #1
2 6708
weaknessforcats
9,208 Expert Mod 8TB
You need to be certain that you are doing a debug build and that all of your libraries are debug libraries.

A debug build places code in the .exe to support the debugger. There are also worker files in the /debug folder of your project to support this also.

If you have a release build, this code is absent and you get the message you describe.

Note: a debug build does not mean defining the prepeocessor _DEBUG symbol.
Mar 24 '08 #2
stand
2
You need to be certain that you are doing a debug build and that all of your libraries are debug libraries.

A debug build places code in the .exe to support the debugger. There are also worker files in the /debug folder of your project to support this also.

If you have a release build, this code is absent and you get the message you describe.

Note: a debug build does not mean defining the prepeocessor _DEBUG symbol.
Thank you for responce. That problem disappeared by itself.
But I have new one. The same issue - I can't debug the code. Here is the description:

I created an empty project "ConsoleApp6". Added a ConsoleApp6.cpp.
Typed the following code:

#include <stdio.h>

int main() {
printf ("Hello!\n");
return 0;
}

Solution is built successfully.
Folders
./ConsolApp6/ConsolApp6/
./ConsolApp6/ConsolApp6/Debug
are created and contain BuildLog.html and etc.
Running ConsoleApp6.exe works as well.
However when I start debugging I see the error message:
"Debugging information for "ConsoleApp6.exe" cannot be found or does not match. Binary was not built with debug information.
do you want to continue debugging?"
After choosing Yes I see in the output:
"'ConsoleApp6.exe': Loaded 'E:\Visual Studio 2005\Projects\ConsoleApp6\debug\ConsoleApp6.exe', Binary was not built with debug information.
'ConsoleApp6.exe': Loaded 'D:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'ConsoleApp6.exe': Loaded 'D:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'ConsoleApp6.exe': Loaded 'D:\Program Files\Common Files\LogiShrd\LVMVFM\LVPrcInj.dll', No symbols loaded.
'ConsoleApp6.exe': Loaded 'D:\WINDOWS\system32\user32.dll', No symbols loaded.
'ConsoleApp6.exe': Loaded 'D:\WINDOWS\system32\gdi32.dll', No symbols loaded.
The thread 'Win32 Thread' (0x4d4) has exited with code 8388608 (0x800000).
The program '[852] ConsoleApp6.exe: Native' has exited with code 0 (0x0).
"
I tried to create WinConsoleApp using template, tried to restart Visual Studio, restart my computer, nothing helps.
What is the problem?
Nov 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: marco_segurini | last post by:
Hi, At the moment I am using Visual Studio 2005 beta 1. The following program does not compile using the debug configuration setting the "Disable Language Extensions" flag to "Yes(/Za)" while...
11
by: serge | last post by:
When i debug a trigger is it possible to add a WATCH on the INSERTED or DELETED? I think not, at least I couldn't figure out a way to do so. Does someone have a suggestion on how I can see the...
5
by: Steve Le Monnier | last post by:
I've just noticed that the menu items available in Visual Studio 2005 for the Debug and Build menus differ significantly when compared to the menu items in Visual Studio 2003. On my C#...
0
by: SammyBar | last post by:
Hi all, I have Visual Studio 2005 Pro installed but I need to make some changes to an old ASP application. I wonder I need to reinstall the old Visual Studio 6 InterDev to debug some few pages....
4
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release...
0
by: Borr | last post by:
Hi all I have Visual Studio 6 and Visual studio 2005 installed on my computer. When I try to debug application written in Visual studio 6 using Task manager/Processes/Right click on process...
1
by: DR | last post by:
What ports do i need to unblock on client and server (running msvsmon.exe) to debug remotely from my client box with visual studio 2005 pro? When I attach to remote process a connection shows up...
2
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream...
1
by: Rene | last post by:
Hi, Given the following code: static void Main(string args) { Debug.Assert(false, "Oopsy"); } If I run the code above using a computer running Visual Studio 2005, I get
3
by: kimiraikkonen | last post by:
Hi, I was looking for an example on CodeProject and saw an interesting thing, i downloaded the article source code and converted to my VB 2005 Express and compiled with no problem, however when i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.