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 trialdiannalord
7,284 PointsHow can one step through the code?
I want to see or confirm how the function bindTaskEvents works as it gets used in 5 different ways. I also want to see what the parameters get set to each time the function gets called.
2 Answers
Alex Friant
6,444 PointsI add console.log(); statements all over the place when I'm trying to understand what's happening while traversing the DOM just to make sure. Once I'm confident I know what's happening, I comment out the console.log so that I can I use it later if needed.
Milo Winningham
Web Development Techdegree Student 3,317 Pointsconsole.log()
and document.write()
are often the fastest way to see what's happening in your code, but it's worth learning your browser's development tools as well. The Debugging a Web App With Chrome Dev Tools workshop will show you how to do this and much more!
diannalord
7,284 PointsThat workshop was fantastic! I think Website Optimization covers some of the same information and expect to learn more on debugging in that course too. Thanks!
Thas Eagans
Courses Plus Student 2,533 PointsThas Eagans
Courses Plus Student 2,533 PointsAdd
document.write();
into the loop. I'm assuming you have a loop inside the function?
</TREagans>