
Debugging Basics
Introduction
The journey to coding mastery will come with a few bumps in the road. Some can be easily resolved by taking a closer look at the code. Others, however, give the learning coder the feeling they’ve picked the wrong career or hobby.
When errors show up, the next step is to figure out why. And although it might be tempting to seek help, it’s much better and easier to perform debugging.
What is debugging?
Debugging is a method that is used to change part of a previously written code in order to eliminate errors that were not caught at the time of syntax checking. It allows developers and authors to see the execution of each line of the code and stop at any of the lines to analyze the input, the variables and the values those variables carry at the time when the execution was terminated.
The code is usually run in a debugging tool (aka debugger) like Visual Studio to find the exact line where the author committed a programming error. Needed corrections are determined, then the errors are removed from the code. Debuggers often provide users with the option to make temporary modifications so they can continue using the program.
Performing debugging effectively requires patience and learning but is ultimately a critical task for every aspiring coder. Below is a breakdown of the basic fundamentals of debugging, plus some tips to help get the coder started.
The basic principles of debugging
Dynamic analysis
Debuggers are dynamic analysis tools. Unlike disassemblers, which offer a static, one-time snapshot of the assembly code of an executable, debuggers actually enable the executable to run. This helps the author to see how the system is changing (e.g., the stack, the memory) as the program executes. There’s a variety (Read more...)
*** This is a Security Bloggers Network syndicated blog from Infosec Resources authored by Dan Virgillito. Read the original post at: http://feedproxy.google.com/~r/infosecResources/~3/Ten8Zu9IGr4/