Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 5733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have Dev C++ and the GNU compiler. I know there are two important debugging options called step and watch, but I don''t know how to use them on a program I have made using the compiler. Overall, I really wanna know how to use a debugger, and if someone could tell me about how to use them effectively or give me a link to a webpage that does I would be really grateful. Thanks, -bioagentX

Share this post

Link to post
Share on other sites
OKay. Fair question.

I''m going to explaine this from a basic point of view. Sorry if it''s a little too basic.

Step is where you can walk throught the lines in a function, line by line.
To do this you need to set a "break point". under dev C thats
ctrl + F5 or clicking with the mouse at the side of the line of code just left of the mirgin line {where the line numbers would be}. be warey, it nees to be a line of code the does something. not an open brace of declaration.

When you run the program after setting a break point the code will run until it reaches that line. It will then stop and return you to the devlopment area. you can then step (F7) throught the code. You can step into sub functions (shift + F7) if you have the source (i.e one of your own functions, not a linked libary).

When doing this you can move your mouse over varibles in scope and see what their value is. Whatching a varible alows the same thing.

Be warned sometimes fullscreen apps play havoc with debuggers because the system is trying to run two programs in different resolutions, at the same time. Log files can be more usful in these cases.

Have fun.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!