User forums > Using Code::Blocks
Debug not work ,seems hang(Annoying)
marcus1877:
Environment: Win7 Ultimate 64bit , CS
codeblocks-13.12mingw-setup.exe
CodeBlocks Path: (Default Path)C:\Program Files (x86)\CodeBlocks
Compiler: MSVC2010
Debugger: cdb.exe
CDB.exe path:(Default) C:\Program Files\Debugging Tools for Windows (x64)
Microsoft SDK: C:\Program Files (x86)\Microsoft SDKs
Project Path: O:\sourceCode\codeblocksDemo
Issue: When i started debugging , it started and hang , no breakpoint work
I tried with GCC , all work well.
Steps:
1. Download CodeBlocks and install with default setting
2. Install VS2012 Express from Microsoft (I googled and knew CDB and SDK would be installed)
3. Launch CodeBlocks and create my console project "codeblocksDemo"
4. Settings=>Debugger , create a new config and set to CDB , then choose cdb.exe at where it is
5. Settings=>Compiler , let CodeBlock search for compiler by default path and success
add SDK path at "Search Directories"=>Compiler and Linker
6. Build project and debug
A console window emerge and stopped , I can't terminate it either by close window nor click "Stop Debugger"
No output
The only way to stop is close CodeBlocks !!!
Build Log:
-------------- Build: Debug in codeblocksDemo (compiler: Microsoft Visual C++ 2010)---------------
Target is up to date.
Nothing to be done (all items are up-to-date).
Build Message:
||=== Build: Debug in codeblocksDemo (compiler: Microsoft Visual C++ 2010) ===|
Debugger Output:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: O:\sourceCode\codeblocksDemo\
Adding source dir: O:\sourceCode\codeblocksDemo\
Adding file: O:\sourceCode\codeblocksDemo\bin\Debug\codeblocksDemo.exe
Changing directory to: O:/sourceCode/codeblocksDemo/.
Set variable: PATH=.;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft Windows Performance Toolkit;C:\Program Files (x86)\CodeBlocks\MinGW\bin
Starting debugger: C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe -G -lines -2 -y O:/sourceCode/codeblocksDemo/; -srcpath O:/sourceCode/codeblocksDemo/; O:/sourceCode/codeblocksDemo/bin/Debug/codeblocksDemo.exe
done
Setting breakpoints
oBFusCATed:
Enable full debugger's log (in the settings of the debugger) and post again.
And please use code or quote tags for long pastes.
marcus1877:
--- Quote from: oBFusCATed on June 17, 2014, 08:47:54 pm ---Enable full debugger's log (in the settings of the debugger) and post again.
And please use code or quote tags for long pastes.
--- End quote ---
I'm trying some ways to solve this problem.
My issue is exactly the same as http://forums.codeblocks.org/index.php?topic=14165.0
ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
--- Code: ---Reference:
http://forums.codeblocks.org/index.php?topic=8454.0
http://support.microsoft.com/kb/311503/zh-cn
http://msdn.microsoft.com/en-us/library/windows/hardware/ff558829%28v=vs.85%29.aspx
--- End code ---
--- Quote ---f 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!
--- End quote ---
[/color]
marcus1877:
All right , This problem is solved by above 2 reference !!!!!!
Set _NT_SYMBOL_PATH in My Computer=>Property=>Advanced System Settings=>Environment Variables
Now a new issue is standing in front of me : First Chance Exception !!!
--- Code: ---[debug](1ff4.1e6c): WOW64 breakpoint - code 4000001f (first chance)
[debug]First chance exceptions are reported before any exception handling.
[debug]This exception may be expected and handled.
--- End code ---
I've refered to http://msdn.microsoft.com/en-us/library/windows/hardware/ff550949%28v=vs.85%29.aspx
and tried to attached a -g to CodeBlocks at Settings=>Debugger=>Select my 'CDB' =>enter "-g" into "Arguments"
However , this -g is not passed to debugger , all command given to CDB in "Debugger" window is
--- Code: ---Starting debugger: C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe -G -lines -2 -y O:/sourceCode/codeblocksDemo/; -srcpath O:/sourceCode/codeblocksDemo/; O:/sourceCode/codeblocksDemo/bin/Debug/codeblocksDemo.exe
--- End code ---
Then I tried /g or -g -g -g -g , no effect !!!
What's going on???
PS:
I enter command prompt and run with -g , the result is ok!!
oBFusCATed:
The user arguments are ignored for CDB, unfortunately. Probably I'll have to fix it.
A user I don't remember his nickname has started a separate implmentation of a CDB debugger plugin. You can probably try it and see if it works better.
Navigation
[0] Message Index
[#] Next page
Go to full version