?
Solved

visual c++ question

Posted on 2003-03-23
1
Medium Priority
?
329 Views
Last Modified: 2010-04-01
i'm working on a networking program and I compiled my program with go (F5) show i can check my breakpoints and my program will display these values in my program correctly, but if i try anything else like batch build - release or execute (ctrl+F5) and I will get values way off from the correct values.

How can I get the debug mode (go - F5) values (correct values) into the release batch?

what makes go (F5) different from the other compiling options that it will display different values from the others?
0
Comment
Question by:ice911
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 8189384
You can debug the program if it contains debug information. By default, only Debug version contains debug information. Changing of project settings allows to add debug information also to Release configuration:

http://www.codeguru.com/debug/release_ver.shtml

With these changes you can use Go command also in Release mode. Some problems still remain when you are debugging the Release version because of compiler optimizations.

Other way to see values of variables in Release mode is using of OutputDebugString instead of TRACE.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question