Dev C++ Debug

Use MSBuild with the Microsoft Visual C compiler or a 3rd party toolset like CMake with Clang or mingw to build and debug your code right in the IDE. Benefit from a first-class CMake experience. Bring your C code to Visual Studio. Mobile development with C. Game Development.

After you have set up the basics of your debugging environment as specified in the configuration tutorials for each target compiler/platform, you can learn more details about debugging C/C++ in this section.

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)

Windows debugging with GDB

You can debug Windows applications created using Cygwin or MinGW by using VS Code. To use Cygwin or MinGW debugging features, the debugger path must be set manually in the launch configuration (launch.json). To debug your Cygwin or MinGW application, add the miDebuggerPath property and set its value to the location of the corresponding gdb.exe for your Cygwin or MinGW environment.

For example:

Cygwin/MinGW debugging on Windows supports both attach and launch debugging scenarios.

To learn more, see Configuring C/C++ debugging.

Dev C++ Debug

If you are debugging with GDB on Windows, see Windows Debugging with MinGW64.

Conditional breakpoints

Conditional breakpoints enable you to break execution on a particular line of code only when the value of the condition is true. To set a conditional breakpoint, right-click on an existing breakpoint and select Edit Breakpoint. This opens a small peek window where you can enter the condition that must evaluate to true in order for the breakpoint to be hit during debugging.

In the editor, conditional breakpoints are indicated by a breakpoint symbol that has a black equals sign inside of it. You can place the cursor over a conditional breakpoint to show its condition.

Function breakpoints

Dev c++ debug crash

Function breakpoints enable you to break execution at the beginning of a function instead of on a particular line of code. To set a function breakpoint, on the Run view right-click inside the Breakpoints section, then choose Add Function Breakpoint and enter the name of the function on which you want to break execution.

Expression evaluation

VS Code supports expression evaluation in several contexts:

  • You can type an expression into the Watch section of the Run view and it will be evaluated each time a breakpoint is hit.
  • You can type an expression into the Debug Console and it will be evaluated only once.
  • You can evaluate any expression that appears in your code while you're stopped at a breakpoint.

Expressions in the Watch section take effect in the application being debugged; an expression that modifies the value of a variable will modify that variable for the duration of the program.

Multi-threaded debugging

The C/C++ extension for VS Code has the ability to debug multi-threaded programs. All threads and their call stacks appear in the Call Stack section:

Memory dump debugging

The C/C++ extension for VS Code also has the ability to debug memory dumps. To debug a memory dump, open your launch.json file and add the coreDumpPath (for GDB or LLDB) or dumpPath (for the Visual Studio Windows Debugger) property to the C++ Launch configuration, set its value to be a string containing the path to the memory dump. This will even work for x86 programs being debugged on an x64 machine.

Additional symbols

If there are additional directories where the debugger can find symbol files (for example, .pdb files for the Visual Studio Windows Debugger), they can be specified by adding the additionalSOLibSearchPath (for GDB or LLDB) or symbolSearchPath (for the Visual Studio Windows Debugger).

For example:

Tutorial

or

Locate source files

The source file location can be changed if the source files are not located in the compilation location. This is done by simple replacement pairs added in the sourceFileMap section. The first match in this list will be used.

For example:

GDB, LLDB, and MI Commands (GDB/LLDB)

For the C++ (GDB/LLDB) debugging environment, you can execute GDB, LLDB and MI commands directly through the debug console with the -exec command, but be careful, executing commands directly in the debug console is untested and might crash VS Code in some cases.

Other debugging features

  • Unconditional breakpoints
  • Watch window
  • Call stack
  • Stepping
Dev c++ programs

For more information on debugging with VS Code, see this introduction to debugging in VS Code.

Known limitations

Symbols and code navigation

All platforms:

  • Because the extension doesn't parse function bodies, Peek Definition and Go to Definition don't work for symbols defined inside the body of a function.

Debugging

Windows:

  • GDB on Cygwin and MinGW cannot break a running process. To set a breakpoint when the application is running (not stopped under the debugger), or to pause the application being debugged, press Ctrl-C in the application's terminal.
  • GDB on Cygwin cannot open core dumps.

Linux:

  • GDB needs elevated permissions to attach to a process. When using attach to process, you need to provide your password before the debugging session can begin.

macOS:

  • LLDB:
    • When debugging with LLDB, if the Terminal window is closed while in break mode, debugging does not stop. Debugging can be stopped by pressing the Stop button.
    • When debugging is stopped the Terminal window is not closed.
  • GDB:
    • Additional manual install steps are required to use GDB on macOS. See Manual Installation of GDB for OS X in the README.
    • When attaching to a process with GDB, the application being debugged cannot be interrupted. GDB will only bind breakpoints set while the application is not running (either before attaching to the application, or while the application is in a stopped state). This is due to a bug in GDB.
    • Core dumps cannot be loaded when debugging with GDB because GDB does not support the core dump format used in macOS.
    • When attached to a process with GDB, break-all will end the process.

Next steps

Read on to find out about:

  • Basic Editing - Learn about the powerful Visual Studio Code editor.
  • Code Navigation - Move quickly through your source code.
  • Tasks - use tasks to build your project and more
  • Debugging - find out about the Visual Studio Code debugger

If you have any other questions or run into any issues, please file an issue on GitHub.

  • Latest Version:

  • Requirements:

    Windows XP / Vista / Windows 7 / Windows 8 / Windows 10

  • Author / Product:

    Bloodshed Software / DEV-C++

  • Old Versions:

  • Filename:

    Dev-Cpp 5.10 TDM-GCC 4.8.1 Setup.exe

  • MD5 Checksum:

    e5fb66d444e6aabd466e1e8a5340c7d2

DEV-C++ is a fully-featured integrated development environment (IDE) for creating, debugging and creating applications written in a popular C++ programming language. Even though tools for the development of C++ software have undergone countless upgrades over the years, a large number of developers located all around the world have expressed a wish to continue using DEV-C++. This IDE platform has proven itself as highly reliable and intuitive, giving developers access to all of their necessary tools, in-depth debugging, and most importantly, a stable error-free environment for the development of apps of all sizes – from small school tasks to large business projects intended for both internal and public use.
The app is an open-source IDE environment, offering software solutions and the necessary tools for C++ app development. However, be aware that its toolset is focused more on novices and basic programming, and that open source community has not updated its toolset for a considerable time. Still, what is present in its latest version represents a highly-capable C++ IDE that could be used for years without encountering any issue.
If you are a novice, are a student who wants to create C++ project in a stable and easy to use software environment, or even if you are a seasoned programmer who wants to access C++ programming inside small IDE that will not strain your computer resources, DEV-C++ represents a perfect choice. It has all the required tools and feature sets for creating small to mid-sized apps.

Dev C++ Online

It runs on all modern versions of Windows and can be used without any restrictions for free. It was originally developed as an open-source fork of the Bloodshed Dev-C++ IDE.

Dev C++ For Windows 10

Installation and Use
Even though DEV-C++ is filled with advanced compiler, debugger and a wide array of dev tools, it’s installation package is quite small (only around 50 MB) and therefore can be easily installed on any modern Windows PC or laptop. Just follow the onscreen instructions, and in mere seconds DEV C plus plus will be ready for running. Other more developed modern IDE environments, on the other hand, require much more storage space, and their installation can run for minutes.
Once up and running, you will be welcomed in a user-friendly interface that can be additionally customized to better fit your needs. The main window of the app follows the basic structure of many other modern IDE environments, with top row of dropdown menus and buttons that are shortcuts to its many built-in tools, a large vertical three-tabbed area for managing Projects, Classes and Debug listings, and of course, the main project area (with support for tabs) where you can start programming your apps. Both the app and the current project can be customized extensively. App Options window features tabs for Genera, Fonts, Colors, Code Insertion, Class Browsing, and Autosave customizations. Environment Options feature tabs for General, Directories, External Programs, File Associations, and CVS support customization.

Dev C++ Debug Watch Variable

Features and Highlights
  • Fully-featured IDE for developing C++ apps.
  • User-friendly interface with many tools for managing project development.
  • Resource-light and unobtrusive feature set.
  • Focused on novices and mid-level programmers who want stability and reliability.
  • Powerful compiler and debugger.
  • Compatible with all the modern versions of Windows OS

Dev C++ Debug Step Into