+ 14

What is the most efficient way to debug your code?

Debugging is considered as one of the most important skills for a programmer. As we come across many types of situations in which we have to debug our code, I wanna know the efficient way to achieve it.

13th Apr 2019, 4:29 AM
Ayush Sinha
Ayush Sinha - avatar
5 Respuestas
+ 4
Checking logs, monitoring files that are configuration specific. Monitoring related services and application servers whether they are working or not in running state. Debugging skills using console, print command, breakpoints, debuggers etc. (depending on the programming language you are using) will be some of the best practices for debugging.
14th Apr 2019, 10:41 PM
Mohd Ashraf Shaikh
Mohd Ashraf Shaikh - avatar
+ 5
gdb is a good debugger for C/C++ programs.
13th Apr 2019, 1:59 PM
Sonic
Sonic - avatar
+ 1
unit testing
13th Apr 2019, 6:22 AM
Jason Kennedy
0
Dependant on the programming language, but I would put logs throughout the code to see where it stops working and try to figure out why it acts like it does. For example using console.log when developing JavaScript. This may not be a rellevant answer if your code is big as it would be annoying to put out function to log all over hundreds or maybe thousand lines of code, in which you should use any debugging tool to help you find the issue in your code.
14th Apr 2019, 8:04 AM
Ragey
Ragey - avatar