Author Topic: CDB detection  (Read 8344 times)

Offline kmdv

  • Single posting newcomer
  • *
  • Posts: 3
CDB detection
« on: February 01, 2012, 12:47:15 pm »
I'm trying to get cdb working with Code::Blocks. Unfortunately CodeBlocks does not detect it. I have done the following (in this order):

1. Installed CodeBlocks (10.5 with MinGW).
2. Installed MSVC 2010 Ultimate.
3. Updated CodeBlocks files to the most recent nightly build (7 jan).
4. Configured CodeBlocks to work with MSVC 2010. Everything compiles fine.
5. Installed MS Debugging Tools.
6. Following this: http://forums.codeblocks.org/index.php?topic=8454.0 I can't get cdb.exe working because it is not detected.

I'm using Windows 7 Pro 32-bit.

My paths:

(Global) Compiler settings -> Toolchain executables -> Compiler installation directory:
C:\Program Files\Microsoft Visual Studio 10.0

(Global) Compiler settings -> Toolchain executables -> Additional paths:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
C:\Program Files\Debugging Tools for Windows (x86)
C:\Program Files\Microsoft SDKs\Windows\v7.0A
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin

I ensured and all of the above paths are correct. Additionally, the first one (Common7\IDE) is added to the environment path.
I tried restarting CodeBlocks and redetecting the compiler (clicking auto-detect and then setting the paths again) and I can still see:

"Debugger: --- Invalid debugger ---".

The only debugger shown under global debugger settings is GDB.

What am I doing wrong?
Thanks!



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CDB detection
« Reply #1 on: February 01, 2012, 01:01:01 pm »
Install a nightly build from the debugger's branch. Then setup a configuration for CDB.

CDB support in 10.05 is pretty much broken, in the latest version of the debugger's branch it should better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline kmdv

  • Single posting newcomer
  • *
  • Posts: 3
Re: CDB detection
« Reply #2 on: February 01, 2012, 01:07:51 pm »
Thank you for the reply. I forgot to add that the recent build I have installed included the debugger branch (http://forums.codeblocks.org/index.php/topic,15777.0.html).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CDB detection
« Reply #3 on: February 01, 2012, 01:15:51 pm »
So this are the steps needed in the nightly:

1. Open the Settings -> Debugger
2. Choose "GDB Debugger"
3. Create config -> Choose some name and click "OK"
4. Choose the newly create config
5. Set "Debugger type" to CDB
6. Set the "Executable path" to point to your executable. It should be something like "C:\mypath\cdb.exe"
7. Click OK
8. Go to the toolchain executables for the compiler and choose the new config in the debugger slot
9. Choose Debug->Active debugger -> Target's default and you're done.

If everything is working, take the time to post a page explaining it to the wiki.codeblocks.org
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]