I* am using client-side JS to parse XML files and generate complex JS code to eval as a result. (Generating re-usable functions that are kicked off by a runtime.) However, I need to debug the code being generated, and would like to use Chrome's built-in breakpoints, stepping, watch windows, etc.
Is there an easier way to do this than:
- Dump the generated JS string to the console and/or window.
- Copy the JavaScript
- (optional) Run the JS through a prettifier like JSBeautifier.
- Paste the JS into a file that is loaded via
<script src="...">in another web page.
* actually, a friend of mine was doing this, not me