Re: How to debug release version with WinDbg?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Voronkov Konstantin (no_at_more.mails)
Date: 01/17/05


Date: Mon, 17 Jan 2005 11:28:19 +0200

sorry, I choose incorrect group. I got assistance
  in microsoft.public.windbg which looks more appropriate
for such kind of questions

Regards,
Konstantin

Voronkov Konstantin wrote:

> Hello, All!
>
> I have a question whether it is possible to debug
> release version of application using WinDbg and how.
> I mean now assembly, but source code debugging.
>
> I made little test application WinDbgTest.cpp:
>
> #include <iostream>
> int main()
> {
> std::cout << "hello world" << std::endl;
> return 0;
> }
>
> I asked compiler to generate symbols file with /Zi option.
> compiler options are: /nologo /MD /W3 /GX /Zi /O2 /D "WIN32"
> /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/WinDbgTest.pch"
> /YX /Fo"Release/" /Fd"Release/" /FD /c
>
> Then I wanted to debug it:
> - compiled application with VC 6.0
> - run WinDbg
> - open executable WinDbgTest.exe in WinDbg
> (automatically execution of test application started)
> - set symbols path to release output folder
> where vc60.pdb file is located
> - set source path where WinDbgTest.cpp file is located
> - set image path where WinDbgTest.exe file is located
>
> When I tryed to set breakpoint at std::cout line I have dialog
> for symbol search and I asked to search symbols immediately,
> but no symbols were able to be located.
>
> What did I wrong? Is it possible to debug release
> applications and set breakpoints in source?
>
> Best Regards,
> Voronkov Konstantin



Relevant Pages