Working with a heavily obfuscated and minified Javascript file. I don't have access to original source. My intent is to understand the script and figure out whether it's malicious or not.
I'm looking for a way to trace the Javascript file and find out which functions are getting called. Any actions performed by the script on DOM or standard window functions need to be logged. For example if createElement is called, I want to log that.
I've modified the HTMLUnit code and related Javascript code and have started adding log statements at points of interest. This shows some promise, but some aspects are still not working. For example I know createElement call is being made, but setting breakpoint or adding log statements did not work.
What can I do to trace Javascript calls being made when it comes to DOM or Window objects?