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 trial

Gedalyah (Gary) Frankel
Courses Plus Student 7,234 PointsHow to Step Thru JavaScript Code Line by Line?
Is there a way to step thru JavaScript code line by line to see exactly what the code is doing. I have done this in VBA, but I would love to be able to do it in JS.
TIA
2 Answers

andren
28,558 PointsIf you want to step though your code you'll need a debugger of some kind.
There are various JavaScript debuggers around, but there is one built right into the Chrome browser that I personally like. It might be a bit overkill for debugging simple code, but it is not that difficult to use once you get the hang of it.
There is a good beginner tutorial for it available here. And there are official tutorials available for it here that are a bit less simple, but goes into more detail about the various functions in the debugger if you need it.
It might seem a bit complicated at first but in exchange for that it is very powerful. So being able to use it properly can be very useful once you start to developing real world apps.

apalm
Full Stack JavaScript Techdegree Graduate 27,641 PointsI think maybe this is what you're looking for.
tobiaskrause
9,160 Pointstobiaskrause
9,160 PointsEvery popular browser has an implemented JS Debugger these days ;)
andren
28,558 Pointsandren
28,558 PointsYes I am aware of that, I did not mean to imply Chrome was the only browser with one built in though I guess my comment can be read as such. Chrome's debugger just happens to be the one I'm most familiar with and Chrome is usually the browser used in Treehouse videos. That's why I focused on that one in my reply. But it is true that Firefox and even IE has one built in these days.