• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why we use debugging in Projects ?  RSS feed

 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why we use debugging in Projects ?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the code that we write is not always 100% correct the first time we write it. Sometimes we notice errors only when we run the program, and in a big and complicated program it can be difficult to discover exactly what the cause is of an error. Debugging the code, for example stepping through it line by line while it executes, makes it easier for us humans to reason about what the program is doing so that we can discover what happens exactly and what the cause of an error is.
 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Very much. Your comment is highly appreciated
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also check out the Wikipedia article on debugging.
 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not want to go through an entire 20 classes code Looking for where the Error is. Debugging the Project gives you a hawk - eye view of the Errors in the process of execution.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fire up my debugger probably two or three times in a year, if that. And I write code for a living. Do I always write perfectly correct code? Not by any stretch of the imagination. The secret is to write unit test cases as you are developing your code. In fact, you should write a unit test before you ever write a line of production code that would make that test pass. If I inadvertently introduce a bug, there's a likelihood that a unit test will fail. The more unit tests I write and the more often I run them (which is right after I write a few lines of code), the more likely I'll be alerted right away of a bug I just introduced. The technique is called Test-Driven Development. Learn it, kids, and you'll likely never have to fire up that debugger ever again. Well, almost never at least.
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe it depends on what you mean by "debugger", but my main use of one is to find out why my test is failing.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matthew Brown wrote:Maybe it depends on what you mean by "debugger", but my main use of one is to find out why my test is failing.


Come to think of it, Matt, that's exactly what I did the last time I fired up mine a couple of months ago.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!