Dev C++ Debugger Menue Not Showing

Dev C++ Debugger Menue Not Showing Average ratng: 4,0/5 8701 votes
  1. Dev C++ Debugger Menue Not Showing Iphone
  2. Dev C Debugger Menu Not Showing On Computer
  3. C++ Debugger Break
-->

The Visual Studio debugger provides many powerful features to help you debug your apps. This topic provides a quick way to learn some of the basic features.

Jul 20, 2016  Dev- C 5.11 debug has stopped working while debug any program. If you try to debug standalone.c file then debug compiler will be crashed. Try to follow procedure to overcome this problem.

  1. Nov 10, 2016  Finally, DEV-C contains a fundamental debugger with various straightforward features. You'll find the basic ones in the tab at the bottom of your screen - visit the Debug menu for more advanced functions. Bugs and alternatives. All the main drawbacks of this IDE boil down to the fact it saw changes in developers and update pauses ever since 2005.
  2. No need to be sorry. Right click the status bar. Click on floating report window. A movable window will come up. Click on the inner tabbed close button. (You may have to right-click the report window to resize it and see the close button) After that just randomly resize the window so that it doesn't.
  3. When I try to use the debugger in Dev C it always says 'your project does not have debugging info, do you want to enable debugging and rebuild your project?' - so I hit yes, it compiles and then it doesn't seem to do anything. I want to debug such that I can step through each line and see how.
  4. Developer Community for Visual Studio Product family. This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.

Create a new project

  1. Open Visual Studio and create a project.

    Press Esc to close the start window. Type Ctrl + Q to open the search box, type c++, choose Templates, then choose Create new Console App project. In the dialog box that appears, choose Create.

    From the top menu bar, choose File > New > Project. In the left pane of the New project dialog box, under Visual C++, choose Windows Desktop, and then in the middle pane choose Windows Console Application. Then, type a name like MyDbgApp and click OK.

    If you don't see the Windows Console Application project template, go to Tools > Get Tools and Features.., which opens the Visual Studio Installer. The Visual Studio Installer launches. Choose the Desktop development with C++ workload, then choose Modify.

    Visual Studio creates the project.

  2. In MyDbgApp.cpp, replace the following code

    with this code (do not remove #include 'stdafx.h'):

Set a breakpoint

A breakpoint is a marker that indicates where Visual Studio should suspend your running code so you can take a look at the values of variables, or the behavior of memory, or whether or not a branch of code is getting run. It is the most basic feature in debugging.

  1. To set the breakpoint, click in the gutter to the left of the doWork function call (or select the line of code and press F9).

  2. Now press F5 (or choose Debug > Start Debugging).

    The debugger pauses where you set the breakpoint. The statement where the debugger and app execution is paused is indicated by the yellow arrow. The line with the doWork function call has not yet executed.

    Tip

    If you have a breakpoint in a loop or recursion, or if you have many breakpoints that you frequently step through, use a conditional breakpoint to make sure that your code is suspended ONLY when specific conditions are met. A conditional breakpoint saves time and can also make it easier to debug issues that are hard to reproduce.

    When trying to debug memory-related failures in C++, you can also use breakpoints to inspect address values (look for NULL) and reference counts.

Navigate code

There are different commands to instruct the debugger to continue. We show a useful code navigation command that is available starting in Visual Studio 2017.

While paused at the breakpoint, hover over the statement c1.push_back(20) until the green Run to click button appears, and then press the Run to click button.

The app continues execution, calling doWork, and pauses on the line of code where you clicked the button.

Common keyboard commands used to step through code include F10 and F11. For more in-depth instructions, see First look at the debugger.

Inspect variables in a datatip

  1. In the current line of code (marked by the yellow execution pointer), hover over the c1 object with your mouse to show a datatip.

    The datatip shows you the current value of the c1 variable and allows you to inspect its properties. When debugging, if you see a value you don't expect, you probably have a bug in the preceding or calling lines of code.

  2. Expand the datatip to look at the current property values of the c1 object.

  3. If you want to pin the datatip so that you can continue to see the value of c1 while you execute code, click the small pin icon. (You can move the pinned datatip to a convenient location.)

Edit code and continue debugging

If you identify a change that you want to test in your code while in the middle of a debugging session, you can do that, too.

  1. Click the second instance of c2.front() and change c2.front() to c2.back().

  2. Press F10 (or Debug > Step Over) a few times to advance the debugger and execute the edited code.

    F10 advances the debugger one statement at a time, but steps over functions instead of stepping into them (the code that you skip still executes).

For more information on using edit-and-continue and on feature limitations, see Edit and Continue.

Next steps

In this tutorial, you've learned how to start the debugger, step through code, and inspect variables. You may want to get a high-level look at debugger features along with links to more information.

What is Dev-C++?
Dev-C++, developed by Bloodshed Software, is a fully featured graphical IDE (Integrated Development Environment), which is able to create Windows or console-based C/C++ programs using the MinGW compiler system. MinGW (Minimalist GNU* for Windows) uses GCC (the GNU g++ compiler collection), which is essentially the same compiler system that is in Cygwin (the unix environment program for Windows) and most versions of Linux. There are, however, differences between Cygwin and MinGW; link to Differences between Cygwin and MinGW for more information.

Click picture to enlarge.

Bloodshed!?
I'll be the first to say that the name Bloodshed won't give you warm and fuzzies, but I think it's best if the creator of Bloodshed explains:

First I would like to say that I am not a satanist, that I hate violence/war and that I don't like heavy metal / hard-rock music. I am french, but I do know the meaning of the 'Bloodshed' word, and I use this name because I think it sounds well. If you are offended by the name, I am very sorry but it would be a big mess to change the name now.

There's also a reason why I keep the Bloodshed name. I don't want people to think Bloodshed is a company, because it isn't. I'm just doing this to help people.

Here is a good remark on the Bloodshed name I received from JohnS:
I assumed that this was a reference to the time and effort it requires of you to make these nice software programs, a la 'Blood, Sweat and Tears'.
Daisydisk private.

Peace and freedom,

Colin Laplace

Menu

Getting Dev-C++
The author has released Dev-C++ as free software (under GPL) but also offers a CD for purchase which can contain all Bloodshed software (it's customizable), including Dev-C++ with all updates/patches.

Link to Bloodshed Dev-C++ for a list of Dev-C++ download sites.

You should let the installer put Dev-C++ in the default directory of C:Dev-Cpp, as it will make it easier to later install add-ons or upgrades.

Using Dev-C++
/cooking-dash-4-download.html. This section is probably why you are here.

All programming done for CSCI-2025 will require separate compilation projects (i.e. class header file(s), class implementation file(s) and a main/application/client/driver file). This process is relatively easy as long as you know what Dev-C++ requires to do this. In this page you will be given instructions using the Project menu choice. In another handout you will be given instructions on how to manually compile, link and execute C++ files at the command prompt of a command window. See here.

Step 1: Configure Dev-C++.
We need to modify one of the default settings to allow you to use the debugger with your programs.

  • Go to the 'Tools' menu and select 'Compiler Options'.
  • In the 'Settings' tab, click on 'Linker' in the left panel, and change 'Generate debugging information' to 'Yes':
  • Click 'OK'.

Step 2: Create a new project.
A 'project' can be considered as a container that is used to store all the elements that are required to compile a program.

  • Go to the 'File' menu and select 'New', 'Project..'.
  • Choose 'Empty Project' and make sure 'C++ project' is selected.
    Here you will also give your project a name. You can give your project any valid filename, but keep in mind that the name of your project will also be the name of your final executable.
  • Once you have entered a name for your project, click 'OK'.
  • Dev-C++ will now ask you where to save your project.

Step 3: Create/add source file(s).
You can add empty source files one of two ways:

  • Go to the 'File' menu and select 'New Source File' (or just press CTRL+N) OR
  • Go to the 'Project' menu and select 'New File'.
    Note that Dev-C++ will not ask for a filename for any new source file until you attempt to:
    1. Compile
    2. Save the project
    3. Save the source file
    4. Exit Dev-C++

You can add pre-existing source files one of two ways:
  • Go to the 'Project' menu and select 'Add to Project' OR
  • Right-click on the project name in the left-hand panel and select 'Add to Project'.
EXAMPLE: Multiple source files
In this example, more than 3 files are required to compile the program; The 'driver.cpp' file references 'Deque.h' (which requires 'Deque.cpp') and 'Deque.cpp' references 'Queue.h' (which requires 'Queue.cpp').

Step 4: Compile.
Once you have entered all of your source code, you are ready to compile.

  • Go to the 'Execute' menu and select 'Compile' (or just press CTRL+F9).

    It is likely that you will get some kind of compiler or linker error the first time you attempt to compile a project. Syntax errors will be displayed in the 'Compiler' tab at the bottom of the screen. You can double-click on any error to take you to the place in the source code where it occurred. The 'Linker' tab will flash if there are any linker errors. Linker errors are generally the result of syntax errors not allowing one of the files to compile.

Once your project successfully compiles, the 'Compile Progress' dialog box will have a status of 'Done'. At this point, you may click 'Close'.

Step 5: Execute.
You can now run your program.

  • Go to the 'Execute' menu, choose 'Run'.
Note: to pass command-line parameters to your program, go to the 'Execute' menu, choose '

Dev C++ Debugger Menue Not Showing Iphone

Parameters' and type in any paramaters you wish to pass.

Disappearing windows
If you execute your program (with or without parameters), you may notice something peculiar; a console window will pop up, flash some text and disappear. The problem is that, if directly executed, console program windows close after the program exits. You can solve this problem one of two ways:

  • Method 1 - Adding one library call:
    On the line before the main's return enter:
    system('Pause');
  • Method 2 - Scaffolding:
    Add the following code before any return statement in main() or any exit() or abort() statement (in any function):
    /* Scaffolding code for testing purposes */
    cin.ignore(256, 'n');
    cout << 'Press ENTER to continue..'<< endl;
    cin.get();
    /* End Scaffolding */
    This will give you a chance to view any output before the program terminates and the window closes.
  • Method 3 - Command-prompt:
    Alternatively, instead of using Dev-C++ to invoke your program, you can just open an MS-DOS Prompt, go to the directory where your program was compiled (i.e. where you saved the project) and enter the program name (along with any parameters). The command-prompt window will not close when the program terminates.

For what it's worth, I use the command-line method.

Step 6: Debug.
When things aren't happening the way you planned, a source-level debugger can be a great tool in determining what really is going on. Dev-C++'s basic debugger functions are controlled via the 'Debug' tab at the bottom of the screen; more advanced functions are available in the 'Debug' menu.

Using the debugger:
The various features of the debugger are pretty obvious. Click the 'Run to cursor' icon to run your program and pause at the current source code cursor location; Click 'Next Step' to step through the code; Click 'Add Watch' to monitor variables.
Setting breakpoints is as easy as clicking in the black space next to the line in the source code.
See the Dev-C++ help topic 'Debugging Your Program' for more information.

Dev-C++ User F.A.Q.

Why do I keep getting errors about 'cout', 'cin', and 'endl' being undeclared?
It has to do with namespaces. You need to add the following line after the includes of your implementation (.cpp) files:

How do I use the C++ string class?
Again, it probably has to do with namespaces. First of all, make sure you '#include <string>' (not string.h). Next, make sure you add 'using namespace std;' after your includes.

Example:

That's it for now.
I am not a Dev-C++ expert by any means (in fact, I do not teach C++ nor use it on a regular basis), but if you have any questions, feel free to email me at jaime@cs.uno.edu

Dev C Debugger Menu Not Showing On Computer

Happy coding!

C++ Debugger Break