简体   繁体   中英

Debugger to Use with MSVC++ 2010 Compiler

Assuming I'm using not-Visual Studio, and building at the command line with cl.exe , what debugger should I use?

I tried using gdb.exe from MinGW but it doesn't seem compatible with the debugging symbols that cl.exe outputs (it reports " no debugging symbols found ").

I feel like this is a kind of ridiculous question to be asking, but it seems to be literally impossible to find information on MSVC++ that isn't VS-specific.

Right now I'm using an install of Visual Studio 2010 Express just for access to cl.exe , but I do not use it as an IDE.

You should learn WinDBG, it can debug both user-mode and kernel-mode code. As you're referring to GDB, I assume the command line interface of WinDBG won't be a problem for you :)

By the way, WinDBG is the official debugger of the Windows developers, so you can expect it to be supported for a long time.

Use WinDbg . This is an excellent debugging tool, although it might get some time to get into. MinGW won't cut it, as it uses a different symbol format. WinDBG is also part of Windows SDK, that you likely have already installed, so just check if you have it already.

If you have Visual Studios (and I don't think you can get cl.exe without it), you can still use its debugger. It's a bit wieldy, because it will insist on creating all sorts of project and solution files you'll have to delete later, but it does work.

What I've usually done in such cases in the past is to develop using g++ and gdb (preferably under Linux), then port the working code to Windows. This means that you almost never need the VS debugger (and gdb is far more powerful than the VS debugger).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM