User forums > Using Code::Blocks
MSVC 8 debugger
johne53:
cacb - it is indeed a useful tip, but what do you get at the end of it? Does it allow you to debug from within C::B or does it simply launch VCExpress as a separate process?
I tried the same kind of thing with Visual Studio 6 (whose exe happens to be called MSDev.exe) but all that happened was that it launched a separate VS6 debugging session (with the named exe already attached) but there was no source code. :(
cacb:
Hi,
Sorry for the late reply (internet connection lost for some time). When you debug this way, it launches the VC2005 Express IDE with its integrated debugger. You can then debug as if the program had been developed there. It would be preferrable to have the MS debugger integrated in C::B of course, but I think this is an acceptable work-around if C::B integration is not possible.
You can do the exact same thing in VC6, there is no difference really. In both cases you have to drop the source files into the IDE (because there is no source file project) to set breakpoints etc. We are simply using a standard feature of the VS debuggers here
If you start with an empty VS (no workspace/project open):
in VC6: Build | Start Debug | Attach to process...
in VC2005 Express: Tools | Attach to Process ...
All we are doing is to use this feature via C::B Tools menu and VS command line options. Full source debugging is available as normal, you just have to open some files explicitely to set breakpoints.
On Linux I use GCC and the integrated C::B debugger. What I miss there is to be able to set the keyboard shortcuts the way I am used to with the VS debugger, especially
F10 : Step over
F11 : Step Into
Shift+F11: Step out
I find myself trying to use these all the time on Linux and it doesn't work :-)
koen:
Note: I had to replace
/debugexe ${TARGET_OUTPUT_FILE}
by
/debugexe ${TARGET_OUTPUT_BASENAME}
otherwise some parts of the path were duplicated.
Albenejean:
--- Quote from: cacb on July 15, 2007, 10:50:32 pm ---Hi,
I use VC2005 Express with C::B, partly because the MSVC debugger is quite good. I have found the easiest is to make a global variable in C::B called VC2005IDE which points to the install dir of VC2005 Express in my case.
Then I configure a tool in the Tools menu
Name: VC2005 Debug
Executable: $(#VC2005IDE)\VCExpress.exe
Parameters: /debugexe ${TARGET_OUTPUT_FILE}
Working directory: ${TARGET_OUTPUT_DIR}
check the option "Launch tool visible detached"
So while I edit/compile/build in C::B, this simple fix launches the VC2005 Express for debugging when needed. Notice that you don't need a VS project/solution to do this.
cacb
--- End quote ---
Excellent!!!!!!!!!!! :mrgreen:
Thanks a lot!
--- Quote ---cacb: That's an excellent tip! I wonder if there's any way that could make it into the C::B Wiki...
--- End quote ---
That would be great, because I had searched for this kind of trick so long.... And I hadn't find anything...
MortenMacFly:
--- Quote from: Albenejean on August 24, 2007, 10:11:09 pm ---
--- Quote ---cacb: That's an excellent tip! I wonder if there's any way that could make it into the C::B Wiki...
--- End quote ---
That would be great, because I had searched for this kind of trick so long.... And I hadn't find anything...
--- End quote ---
Well - it's a WiKi. So everybody of you can do it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version