473,909 Members | 5,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to debug C++ code in Visual Studio 2005

2 New Member
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.Deb ugging 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 6728
weaknessforcats
9,208 Recognized Expert Moderator Expert
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 New Member
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 "ConsoleApp 6". 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.ex e" 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.e xe': Loaded 'E:\Visual Studio 2005\Projects\C onsoleApp6\debu g\ConsoleApp6.e xe', Binary was not built with debug information.
'ConsoleApp6.ex e': Loaded 'D:\WINDOWS\sys tem32\ntdll.dll ', No symbols loaded.
'ConsoleApp6.ex e': Loaded 'D:\WINDOWS\sys tem32\kernel32. dll', No symbols loaded.
'ConsoleApp6.ex e': Loaded 'D:\Program Files\Common Files\LogiShrd\ LVMVFM\LVPrcInj .dll', No symbols loaded.
'ConsoleApp6.ex e': Loaded 'D:\WINDOWS\sys tem32\user32.dl l', No symbols loaded.
'ConsoleApp6.ex e': Loaded 'D:\WINDOWS\sys tem32\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
1809
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 using the release configuration the build has no problem. Setting "Disable Language Extensions" flag to "No" I have no problem in both debug/release configurations.
11
37047
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 values? I did try to do something like INSERT INTO TABLE1(NAME) SELECT NAME FROM INSERTED
5
1989
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# installation I don't have build solution, rebuild solution, Step into, Step out, or the Exceptions options on my menu Does anybody know why these important tools are missing from the menu structure?
0
995
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. Can I use the Visual Studio 2005 debugger to debug plain old ASP? How should I configure it? Thanks in advance. Sammy
4
6259
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 version to build successfully. Unfortunately, it crashes right away when I start it. So now I need to build the debug version. Unfortunately, the compiler gives innumerable error messages of the sort shown below. The #include file referenced...
0
1296
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 name/Debug , I get a gialog that asks me to select a debugger, but only debugger I can select is Visual studio 2005 ! I have no option to select Visual Studio 6 as a debugger. Does it mean that after installation of Visual Studio 2005 I have no...
1
2546
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 in msvsmon.exe on the remote machine, however, the client box with visual studio displays error: "Unable to connect to the mricosoft visual studio remtoe debugging monitor named 'the box name' the micorosft visual studio remote debugging monitor...
2
2716
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 in("myfile.txt"); float value; in >value; //The crash happens here in the getloc() function The above code is actually from a library built in Debug mode that is linked into the Release build of the executable. Does anyone have any
1
1691
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
3751
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 debug the program to and split a file(size doesn't matter) in debug mode with VS, that is, a file merge-split tool, nearly i always get a "cross- thread operation not valid" error for progress bar, whereas double clicking and launching program...
0
9879
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
11052
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10540
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9727
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8099
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7249
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3359
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.