Author Topic: Debugger for VC++ Express 2008+Codeblocks 10.5?  (Read 5914 times)

HeiSF

  • Guest
Debugger for VC++ Express 2008+Codeblocks 10.5?
« on: March 01, 2011, 02:27:38 am »
Hi,

I am trying to debug with codeblocks on Win7 32bit machine.

Codeblocks builds and runs my application with VC++ Express 2008 correctly.

However, I am not able to run the debugger.

When I run the debugger, it says, "The debugger executable is not set", and I did follow this post:
http://forums.codeblocks.org/index.php?topic=8454.0

to include the Debug Tool folder in the additional path in Tool Chain tab.

But it still gives me the same error.

Anyone could provide a step-by-step instruction?

Thanks in advance.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
« Reply #1 on: March 01, 2011, 08:24:57 am »
1. Install debugger's branch nightly, there were major improvements to the CDB handling.
2. Check if CDB.exe can be found at the place you've added to the additional paths
(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 cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
« Reply #2 on: March 01, 2011, 09:57:38 am »
1. Install debugger's branch nightly, there were major improvements to the CDB handling.
2. Check if CDB.exe can be found at the place you've added to the additional paths


Interesting. I am using VC2008 compiler as well. Does your statement above mean that we are/will be able to use integrated (in C::B) debugging of code compiled with the VC2008 express or full version compiler?

So far I am editing/building in C::B but debugging via the VC 2008 IDE by installing it as a "Tool" in C::B

Code
Name: VC Debug
Executable: $(#VCIDE)\devenv.exe
Parameters: /edit  ${ACTIVE_EDITOR_FILENAME}  /debugexe ${TARGET_OUTPUT_FILE}
Working directory: ${PROJECT_DIR}

check "Launch tool visible detached"

The above is for the full version of VC2008, but it is quite similar for the Express version that I use on another machine (actually the Express version works a little better than the full version in this respect). The VCIDE mentioned above is a global variable defined as
Code
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

This system works reasonably well, but if integrated debugging works with MS compilers I would be happy!
« Last Edit: March 01, 2011, 09:59:34 am by cacb »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
« Reply #3 on: March 01, 2011, 10:29:38 am »
Don't expect miracles, CDB is not mean for integration, so the support is pretty basic (and probably pretty unreliable).

Breakpoints, simple watches should work...
(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!]

nnemo

  • Guest
Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
« Reply #4 on: May 26, 2011, 10:57:08 pm »
So far I am editing/building in C::B but debugging via the VC 2008 IDE by installing it as a "Tool" in C::B

Code
Name: VC Debug
Executable: $(#VCIDE)\devenv.exe
Parameters: /edit  ${ACTIVE_EDITOR_FILENAME}  /debugexe ${TARGET_OUTPUT_FILE}
Working directory: ${PROJECT_DIR}

check "Launch tool visible detached"

I've used MSVS a similar way. The only difference is that I was using an predefined MSVS command's alias (Debug.StepInto) for stopping execution automatically at the entry point and without presetting the any break points before debugging.

My tool's configuration is...

Code
Name: MSVS10_as_debugger
Executable: <MSVS install directory>\Common7\IDE\devenv.exe
Parameters: /command t "${PROJECT_DIR}$(TARGET_OUTPUT_FILE)" (quotes are required in my case because the configuration name contains a spaces)
Working directory: ${PROJECT_DIR}${TARGET_OUTPUT_DIR}