With web development on the rise, there are plenty of tools that exist for analyzing and debugging JS code—from basic text editors with syntax highlight to quite sophisticated packages. However, the developer's use cases are quite different from the reverse engineer's, which eventually affects a set of programs used by them.
First of all, in order to speed up the analysis, it makes sense to reformat the existing JS code so that it is easier to follow the logic. There are multiple tools that serve this purpose, which also contain basic unpacking and deobfuscation logic, such as jsbeautifier.
In terms of generic dynamic analysis, embedded browser toolsets such as Chrome Developer tools or Firefox Developer tools are extremely handy. In order to use them, the small HTML block needs to be written in order to load the JS file of interest.
Here, the JS code is embedded into the page itself:
