Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Live Editing Code with Google Chrome1:20 with Andrew Chalkley
A powerful feature of debugging with Chrome is the ability to edit the code being executed on the fly and seeing your experiments without saving any files or restarting servers.
We found the problem by jumping inside a function and
experimented by changing the options in the debug console.
But there's another way you can experiment while debugging and
that's by editing the code life.
If we trigger the break-point again by refreshing the page,
on line 42 we can see that the reversed variable
is being passed into the local variables that are accessed by the template.
This is where we should be passing in the original variable too.
I can directly edit the line on 42 to test it out.
This doesn't save the file to disk,
it's editing the code running in the computer's memory.
When we hit Resume, it works.
We can temporarily disable the breakpoints with the Deactivate Breakpoints button.
And we can test out some other routes.
And it works, great.
You still have to use your code editor to include your fix there too, and save.
I hope you enjoyed seeing some of the debugging tools available to you, and
how they can improve your development cycle.
You need to sign up for Treehouse in order to download course files.Sign up