Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: HeiSF on March 01, 2011, 02:27:38 AM

Title: Debugger for VC++ Express 2008+Codeblocks 10.5?
Post by: HeiSF 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.next.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.
Title: Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
Post by: oBFusCATed 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
Title: Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
Post by: cacb on March 01, 2011, 09:57:38 AM
Quote from: oBFusCATed 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


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

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 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!
Title: Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
Post by: oBFusCATed 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...
Title: Re: Debugger for VC++ Express 2008+Codeblocks 10.5?
Post by: nnemo on May 26, 2011, 10:57:08 PM
Quote from: cacb on March 01, 2011, 09:57:38 AM
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

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...

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}