Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAnthony c
20,907 PointsNot clear on why I would want to set a breakpoint
What does a breakpoint tell me?
Where are the best places for breakpoints?
Alternative resource suggestions welcome!
2 Answers
Tim Larson
Full Stack JavaScript Techdegree Student 13,696 PointsBreakpoints are a great tool for identifying sections of your code that may be problematic.
While debugging, having breakpoints to segment different functions from one another will save you loads of time identifying where your problem(s) lie.
"A breakpoint is a signal that tells the debugger to temporarily suspend execution of your program at a certain point. When execution is suspended at a breakpoint, your program is said to be in break mode. Entering break mode does not terminate or end the execution of your program. Execution can be resumed at any time."
Anthony c
20,907 PointsSo they are used to do a process of elimination?
Tim Larson
Full Stack JavaScript Techdegree Student 13,696 PointsIf you could upvote or mark as best answer I would greatly appreciate it!
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsChanged from comment to answer
Anna Grais
12,743 PointsAnna Grais
12,743 PointsSo it is instead of deleting stuff directly in your code/commenting parts of your code out?
For example, setting breakpoint at res.send(posts); in the node-inspector window, is equal to:
Is that correctly understood?