What is Debugging Process

前端 未结 2 1484
小蘑菇
小蘑菇 2021-01-29 06:28

I am confused a little bit here , I Know it is really very simple question , but I am not getting it properly.

What Actually Debugging process do ? On Google it says \"

相关标签:
2条回答
  • 2021-01-29 06:54

    In particular, a "debugger" is a software tool that allows you launch another program (the program that is being debugged), and to observe it while it is running. You can, for example, set "breakpoints" which will cause the program to stop at a particular point, and you can then observe the values in CPU registers, memory, and so forth.

    You can't fix bugs in the debugger, but you can find them.

    Having said all that, I almost never use these tools. I find that "printf debugging" (as Nilesh put it ...) is much more useful.

    0 讨论(0)
  • 2021-01-29 06:57

    Debugging is -- literally -- the process of removing bugs from your program.

    But first you need to find those bugs.

    You can do that in different ways:

    • Sprinkling your code with logging/tracing statements: this is called "printf debugging".
    • Thinking really hard.
    • Using a debugger, which allows you to step through your program, pausing it (using breakpoints) and looking at the current values of the variables in it.

    Once you've found the bug, you need to remove it. For that, you go back to your text editor and fix the code. That part doesn't use the debugger.

    But, these days, most programmers use a combined editor/debugger (an IDE).

    0 讨论(0)
提交回复
热议问题