User forums > Using Code::Blocks
Unable to debug with Visual C++ 2008 Express
lingol:
Hei, guids, I have the same problem and try to solve it the whole morning. Now I guess I find out an way to avoid the annoying ERROR
"*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -".
If you use CDB.EXE in the commandline without any parameters, it will print many useful informations, one of which is
Environment Variables:
_NT_SYMBOL_PATH=[Drive:][Path]
Specify symbol image path.
Now you can add the environment variable _NT_SYMBOL_PATH with value :
SRV*C:\MyLocalSymbols*http://msdl.microsoft.com/download/symbols
Here the folder C:\MyLocalSymbols is used by CDB.EXE to download symbols from Internet, you can change it to any other locations as you wish.
If you think it terrible to wait for downloading necessary symbols when you are debugging. You can download all symle packages once and install and set the install folder to the environment variable _NT_SYMBOL_PATH. The download link is http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx.
Have fun with CodeBlocks!
stahta01:
Link renamed to http://www.microsoft.com/whdc/DevTools/Debugging/symbolpkg.mspx
looks like an change in case only.
Another link to look at is
http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
Tim S
andwan0:
So did this solve? Can you now debug?
photon3108:
I tried to debug with cdb.exe in codeblocks but it doesn't work.
First step:
I have installed Codeblock v5716, visual c++ express 2008, Debugging Tools for Windows 32-bit Version. And set environment variable _NT_SYMBOL_PATH with
SRV*C:\MyLocalSymbols*http://msdl.microsoft.com/download/symbols.
Second step:
I add the path, C:\Program Files\Debugging Tools for Windows (x86), and Codeblocks can find cdb.exe.
Third step:
I create a default Helloworld project and add getchar() after the cout. Select Debug target and build test.exe.
( Because breakpoint does'nt work now for cdb.exe in Codeblocks, I use getchar(). )
Forth step:
[Debug]-->[Start(F8)] and Debugger said "*** WARNING: Unable to verify checksum for test.exe".
There was not any console. It looked like work because cdb.exe and test.exe run in the memory.
If I run it handily in the windows console,
C:\Program Files\Debugging Tools for Windows (x86)>cdb C:\test\bin\Debug\test.exe and use "g" command to
continue, it has the
same problem, no console. After finding the relational argument "-2", I tried to run C:\~>cdb -2 C:\~\test.exe.
The result is different. The console for test.exe is open.
cdb.exe and WinDbg are really not convenient. I like Codeblocks more. How to solve codeblocks has no console and breakpoint is down?
cacb:
Hi, I use MS compiler on windows as well, exactly because the debugging features are very good.
Unfortunately, the only way I have found to be able to debug code written in Code::Blocks is to use the integrated debugger in the Visual Studio IDE..., but fortunaetly it is quite easy to write an entry in the Code::Blocks Tools menu that will launch the VS IDE for debugging, complete with source files etc.
See this old thread for details.
http://forums.codeblocks.org/index.php/topic,6419.0.html
On Linux I use GCC with the same project, but I feel my hands are completely tied wrt. debugging. Is there somewhere a "hold my hand" tutorial on how to do debugging in Code::Blocks under Linux?
Navigation
[0] Message Index
[*] Previous page
Go to full version