Is it possible to build executable with Microsoft Visual C++ Express, so it could be debugged with gdb?
I tried C7 compatible /Z7
compiler option with /debug
linker option, but resulting .pdb
file is not recognized by gdb:
(gdb) symbol-file HelloWorldVC.pdb
`HelloWorldVC.pdb': can't read symbols: File format not recognized.
Visual Studio Code supports the following debuggers for C/C++ depending on the operating system you are using: Linux: GDB. macOS: LLDB or GDB. Windows: the Visual Studio Windows Debugger or GDB (using Cygwin or MinGW)
To set a breakpoint on a line, just click on the gutter (the gray band on the left), or press Ctrl-F5. Now you are ready to launch the debugger, by pressing F8 or clicking the debug button. If everything goes well, the program will start, and then stop at the first breakpoint.
In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).
GDB has a different debug format than Microsoft's compiler. Indeed the PDB format is not documented. So you can't use the debug information generated by a Microsoft compiler with GDB.
Honestly I can't find any benefit of GDB that I would use it instead of the debugger of Microsoft Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With