Author Topic: What debugger to use from C::B for MSVC compiled project ?  (Read 7072 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
What debugger to use from C::B for MSVC compiled project ?
« on: June 10, 2012, 12:02:56 pm »
Hello. I've configured C::B with TDM-GCC and MSVC9 compilers. Of course, I've well seen that MS compiler is not supported in Code::Blocks and that DBG is inoperative with MSVC compiled app... So, how to debug a DEBUG target compiled with MSVC9 ? Is there a way or should I just forgot any DEBUG target with MSVC and build all my projects with GCC about DEBUG and MSVC about RELEASE only ? How do you do for your own projects ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #1 on: June 10, 2012, 12:41:57 pm »
I've well seen that MS compiler is not supported in Code::Blocks
Why do you think so? What I've tried to compile with MS VC++ compiler have worked...

For the debugger there is some support, but it is very limited as MS doesn't provide debugger meant for integration in other IDEs.
What you need is Debugging Tools For Windows (CDB.exe is required), a nightly build of C::B and some playing around with the settings.

Generally if it is not a MS VC only problem I suggest to debug it with cb+gdb it will be a lot easier.
(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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #2 on: June 10, 2012, 02:17:02 pm »
I've well seen that MS compiler is not supported in Code::Blocks
Why do you think so? What I've tried to compile with MS VC++ compiler have worked...

Oops :-X Sorry ! it was a typo ; certainly because I'm testing compilers since some days (so the word what blocked in my mind)... I wanted to say :

"I've well seen that MS debugger is not supported in Code::Blocks"

And, as you clearly say, Obfuscated, it's just because MS doesn't provide any standalone one :'(
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6666
    • My Best Post
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #3 on: June 10, 2012, 04:11:22 pm »
I've well seen that MS compiler is not supported in Code::Blocks
Why do you think so? What I've tried to compile with MS VC++ compiler have worked...

Oops :-X Sorry ! it was a typo ; certainly because I'm testing compilers since some days (so the word what blocked in my mind)... I wanted to say :

"I've well seen that MS debugger is not supported in Code::Blocks"

And, as you clearly say, Obfuscated, it's just because MS doesn't provide any standalone one :'(


Please re-read.

This is false "And, as you clearly say, Obfuscated, it's just because MS doesn't provide any standalone one"

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #4 on: June 10, 2012, 05:18:30 pm »
Effectively : I suppose you think about WinDbg as standalone MS debugger, while in my mind I didn't remember it exists other thing than the integrated Visual Studio debugger ;s
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6666
    • My Best Post
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #5 on: June 10, 2012, 07:24:57 pm »
Effectively : I suppose you think about WinDbg as standalone MS debugger, while in my mind I didn't remember it exists other thing than the integrated Visual Studio debugger ;s

I think about CDB.exe as a command line debugger (NOTE: WinDbg != CDB.exe).

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #6 on: June 11, 2012, 02:02:40 pm »
Interesting : so, CDB could be binded with C::B ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #7 on: June 11, 2012, 02:57:48 pm »
Interesting : so, CDB could be binded with C::B ?
Yes. It is supported, but not to an extend as GDB.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #8 on: June 11, 2012, 11:37:54 pm »
OK, thanks Morten. So, how to add-it ? Should I add a specific plugin to support CDB from C::B ? I don't see any reference to it in "Settings / [Compiler|Debugger]".
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #9 on: June 11, 2012, 11:58:18 pm »
Probably start with searching the forum...
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #10 on: June 12, 2012, 06:42:34 am »
I don't see any reference to it in "Settings / [Compiler|Debugger]".
You need to setup a debugger environment in Settings -> Debugger -> Create config -> setup executables -> Select the radio button "CDB" -> Make use of this config when debugging.

@oBFusCATed: I guess its a bit mis-leading that where you setup this config there is a label named "GDB debugger" in the tree. Maybe it should just be "Debugger"?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #11 on: June 12, 2012, 09:04:13 am »
Or "GDB/CDB Debugger"
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #12 on: June 12, 2012, 01:31:07 pm »
Or "GDB/CDB Debugger"
Yes, that would be more precise. Patch? ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #13 on: June 12, 2012, 11:15:08 pm »
In svn...
(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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: What debugger to use from C::B for MSVC compiled project ?
« Reply #14 on: June 17, 2012, 05:27:10 pm »
OK, thanks to both of you. I'll take a try asap ; I'm on different fields at same time these days, it's the reason why of my delay of reaction ::)
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]