Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging with Visual C++ Toolkit 2003 and CodeBlocks

I'm working on a C++ project using the free Microsoft Visual C++ Toolkit 2003 (compiler VC++ 7.1) and the CodeBlocks IDE. As you might know, this free package does not include the debugger tool, just compiler and linker.

Is there any way to include a debugger in my current scenario? What are my chances of debug this project without using Visual Studio?

like image 614
cdonts Avatar asked Jul 27 '15 20:07

cdonts


2 Answers

Since Code::Blocks is your preference, and you wish to use remote debugging, and you have experience with the VC compiler, the easiest and smoothest solution may be to stay on that path. As @user1610015 suggested, update to VS2015 Community Edition, which most certainly contains a standalone compiler (cl) and linker (link). Of course, CL will call the linker on your behalf, unless you specify otherwise.

Here is the comparison chart (select 'expand all') of VS editions.

As a bonus, you will receive some tremendous updates with respect to modern C++ (11 and 14), better remote debugging, better code generations, countless optimizations, improved error reporting and analysis, and others.

However with respect to __asm (as of VS2013), you will be limited to x86. When requiring x64, some have chosen to port this to intrinics, but many simply move the assembler to a separate .asm file, and a small configuration change to have VS compile the file:

  • Select the project (not .sln)
  • From the menu, select Project --> Build Custizations...
  • Check the box next to masm

If you intend to target x86, no changes will be necessary. You didn't specify the migration changes with your reference to VS2008, but having migrated several large old projects from early VS compilers, I have found the experience to be pretty painless.

If your compiler specific code is not overwhelming, consider Clang and gcc (MinGW). I like to use CLion, and use gcc to compile the same projects (CMake) which I have a VS2015 project and solution for. I am sometimes surprised at some necessary corrections. I haven't tried Code::Blocks, but I suspect it is a similar exercise.

Good Luck. I am certain you will crush it.

like image 50
Jeff Avatar answered Nov 11 '22 12:11

Jeff


Don't know about Microsoft Visual C++ Toolkit 2003 but CodeBlocks IDE comes with a default debugger(GDB/CDB). During the installation the wizard asks to GDB as the default debugger.

If you have installed the debugger and if there is some configuration problem then you can goto Settings->Debugger and set the debuggers path.

If the debugger is not installed the you can install it by going to Plugins->Manage Plugins->Install New Plugin

Can't Post images sorry.

like image 31
Build3r Avatar answered Nov 11 '22 10:11

Build3r