473,405 Members | 2,344 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,405 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 6709
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.