Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Devc programming software program how to debug devc debugging steps graphic text method tutorial

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Computer Software News >

Share

Shulou(Shulou.com)05/31 Report--

Devc is a very good programming software, for its debugging many friends do not know very well, let's take a look.

How to debug devc

First of all, what is debugging? Debugging (also known as debug) is a way to find the exact location of an error based on changes in data in a program. Although many editors have their own error correction function, it can only find grammatical errors, not logic and definition errors, especially when we are compiling some rather complex programs. We need to learn how to debug. Next I'll briefly show you how to use the debugging capabilities of DevC++.

# # framing error range

Next we will use Debug to correct relatively simple definition errors in editing.

First of all, let's write the following program

The b defined by double in this program should have been declared using% lf, but the program in the figure mistakenly uses% f. The error correction function of the error editor can not be found, but it will affect the output of the program.

According to the program in the figure, if the program is correct, the final output should be

Then it is obvious that the output of C is different from the reality, but the result of C is related to the values z and b, so we can't help but infer that the problem lies with z or b.

# # start and end 1

When the program we design is quite complex, it is impossible for us to debug one by one from beginning to end, so we have to learn how to set the starting point and the end point.

First of all, let's click the button below to adjust to the debug interface to the debug interface.

Then look for the place where the wrong location might start (that is, where z is defined), and click the number to the left of the line to set it as the starting point.

By the same token, we click on the number to the left of the output C line, which sets the line as the end point, the start point and the end point.

When starting debug, the program will run line by line when it reaches the starting point, and when we want the program to continue, we must click the next line item in the Debug bar

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Computer Software News

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report