Skip to main content

DEBUGGING

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. -->
The debugging skill of the programmer is probably the biggest factor in the ability to debug a problem, but the difficulty of software debugging varies greatly with the programming language used and the available tools, such as debuggers. Debuggers are software tools which enable the programmer to monitor the execution of a program, stop it, re-start it, set breakpoints, change values in memory and even, in some cases, go back in time. The term debugger can also refer to the person who is doing the debugging.
Generally, high-level programming languages, such as Java, make debugging easier, because they have features such as exception handling that make real sources of erratic behaviour easier to spot. In lower-level programming languages such as C or assembly, bugs may cause silent problems such as memory corruption, and it is often difficult to see where the initial problem happened. In those cases, memory debugger tools may be needed.
In certain situations, general purpose software tools that are language specific in nature can be very useful. These take the form of static code analysis tools. These tools look for a very specific set of known problems, some common and some rare, within the source code. All such issues detected by these tools would rarely be picked up by a compiler or interpreter, thus they are not syntax checkers, but more semantic checkers.
Often the first step in debugging is to attempt reproduce the problem. This can be a non-trivial task
After the bug is reproduced, the input of the program needs to be simplified to make it easier to debug. For example, a bug in a compiler can make it crash when parsing some large source file. However, after simplification of the test case, only few lines from the original source file can be sufficient to reproduce the same crash
After the test case is sufficiently simplified, a programmer can use a debugger to examine program states (values of variables, the call stack) and track down the origin of the problem. Alternatively tracing can be used. In simple case, tracing is just a few print statements, which output the values of variables in certain points of program execution.


Comments

Also read

Debate : Do the ends justify the means...

Note : Give it all a fair thought before you jot down... Flaming and religion-bashing will not be tolerated. Your participation is gladly appreciated. I dunno if you folks remember this incident; a couple of yrs back, the UPSC exam had a question where the emainee had to assert his views on *revolutionary terrorism* initiated by Bhagat Singh. As is typical of the government, hue and cry was not far behind... Anyway, let us look at some facts -   Bhagat Singh was an atheist, considered to be one of the earliest Marxist in India and in line with hi thinking, he renamed the Hindustan Republican Party and called it the Hindustan Socialist Revolutionary Party. Bhagat Finally, awaiting his own execution for the murder of Saunders, Bhagat Singh at the young age of 24 studied Marxism thoroughly and wrote a profound pamphlet “Why I am an Atheist.” which is an ideological statement in itself. The circumstances of his death and execution are worth recounting. Although, Bhagat Singh had a...

"My cousin touched me there"

Note: When Tan suggested me to post this here...I gave it a thought. I felt he was right.  yeha I know in the election times ..people would be more inclined to politics. Well still..just give it a read :) For the first time when she came in I knew she is going to be one of my best pals. she was bubbly chirpy sociable and a caring human being.she was I felt my true copy. But what I felt wasn't true and I'd never known that trait of hers which never matched mine had such a reason behind it. She never liked to talk or be familiar to the opposite sex. I found this irritating but I just used to remember all her other traits which brought her close to me and made her one of the closest beings to me on this Earth. As she and I had got very close in friendship that we began sharing secrets which we never thought would come out of our mind. And I thought I understood her as I thought she was me. Then one day as we were alone in my room I asked her why she was so unfamiliar and irritat...

Why do bookshop stories comfort us? Review of Days at the Morisaki Bookshop and More Days at the Morisaki Bookshop

You often reach for gentle stories when life feels heavy. This long-form review looks at Days at the Morisaki Bookshop and its sequel as one continuous experience. It reflects on heartbreak, books, and belonging, while questioning the books’ depth, popularity, and emotional staying power. Comfort is guaranteed. Impact is debated. Why do we turn to quiet books when life feels unbearably loud? Have you noticed how, when everything feels too noisy, too demanding, and too sharp, you do not want fireworks from a book ? You want a chair by a window, a cup of tea gone slightly cold, and a story that does not ask much of you. That is usually when novels like Days at the Morisaki Bookshop find you, not the other way around. You reach for these books when your own thoughts feel cluttered. When ambition has tired you out. When grief does not announce itself loudly but sits beside you like an awkward guest who refuses to leave. Satoshi Yagisawa’s Morisaki Bookshop series arrives wrapped in...