Unfortunately, I do Javascript using notepad, so I can’t really help you on tools.
I’d usually just write a “UnitTest” function and put my code there. From the browser, you can directly invoke a function, so you’d just do “UnitTest();” or “UnitTest_Module8();” and have them display results in the form of alerts or such.
Another useful technique is to add a label or textbox to the HTML, and then keep running debug information there, for tracking variable that you suspect might be getting set wrong. I’d also often scatter alerts through my code, just so I could tell “Okay, it has reached this point in the code” or “Okay, at this point, x=5″
IMO, the major power of javascript is the ability to run commands “on the fly” from the browser itself, and the ability to very quickly modify the source code and re-run the program.
Unfortunately, I do Javascript using notepad, so I can’t really help you on tools.
I’d usually just write a “UnitTest” function and put my code there. From the browser, you can directly invoke a function, so you’d just do “UnitTest();” or “UnitTest_Module8();” and have them display results in the form of alerts or such.
Another useful technique is to add a label or textbox to the HTML, and then keep running debug information there, for tracking variable that you suspect might be getting set wrong. I’d also often scatter alerts through my code, just so I could tell “Okay, it has reached this point in the code” or “Okay, at this point, x=5″
IMO, the major power of javascript is the ability to run commands “on the fly” from the browser itself, and the ability to very quickly modify the source code and re-run the program.