7

I've a couple of Makefile projects on my visual studio (express) 2005/2008 (doesn't matter for now) to compile some application using the MinGW GCC compiler. I don't want to use the MS compiler because there are features that only are available on GCC.

Now I'd like to debug from inside VS since I'm coding from it but this requires me to use GDB (it works from the command line) but i prefer to use the IDE tools.

Is there a way to do this? Even if the Express version is limited and doesn't support it can it be done using the full version?

Paulo Lopes
  • 5,845
  • 22
  • 31
  • See [WinGDB](http://www.wingdb.com/). – Alex Mar 03 '11 at 14:52
  • @Alex if the WinGDB is the debugger that being shipped with Visual Studio, than it isn't a good advice at all. I am right now using this with Visual Studio 2010, and it seems that it can nor set a commands for a breakpoint *(the thing I was used very extensively, i.e. print a variable and continue)*, not continue a few times… Also here's some annoying bugs like that I sometimes can't enter a variable name in «Memory» window, it automatically lower the case of the first letter. Somebody, give me my GDB back! ☹ – Hi-Angel Oct 15 '14 at 08:47

3 Answers3

4

If you prefer IDE working under Windows you may be interested in Code Blocks or Qt Creator. They are free.

There are commercial dev-tools for Unixes too: MagicC++ (IDE), debuggers like TotalView, Allinea, Zero-bugs, UndoDB ...

If you want to stay with Visual Studio check this WinGDB. It is not supported by Express edition (extensions are not supported at all). But Microsoft have recently released free Visual Studio Community (has almost all features of Professional Edition), which is free and can be legally used by students/hobbyists/startups - free for individuals for developing commercial applications, free for organizations for developing open source applications, free for organizations (for up to 5 individual users) for developing commercial applications only if the organization has less than 250 computers and has less than $10M annual revenue. Refer VS 2013 Community License for more information.

By the way VirtualBox may be very helpful (I debug (Open)Solaris or Linux as VBox machines very frequently) ;-).

Sachin Joseph
  • 18,928
  • 4
  • 42
  • 62
Dominic.wig
  • 314
  • 3
  • 5
2

Normally you cannot use it with Visual Studio Express, as VS Express does not support third-party add-ins and will only work with Microsoft debugger (requiring symbol information from Microsoft compiler).

However, you can make Visual Studio Professional (or higher) work with GDB by installing a third-party plugin such as VisualGDB.

Note that there are several ways to get Visual Studio Professional for free:

  1. If your software company is a product-oriented startup, you can get free Visual Studio via BizSpark
  2. If you are a student, you can also get a free Visual Studio license via DreamSpark
Ivan Shcherbakov
  • 2,063
  • 14
  • 23
0

As far as I know, you can only debug from within the IDE if you have compiled your code with the Microsoft compiler. Otherwise, the Visual Studio debugger doesn't have a clue what to do with the GDB debug information.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • As i said on the question I am compiling with GCC using a Makefile project. All works, code editing, compiling (VS delegates to make and GCC) ande even debugging from the command line, I would like to switch from the command line to the visual environment. – Paulo Lopes Jan 16 '09 at 09:04
  • As I said, if you want to use the Microsoft IDE debugger then you must also use the Microsoft compiler (and not GCC). Setting up a "Makefile project" is not sufficient. – Greg Hewgill Jan 16 '09 at 09:37