I am running a test suite which uses karma to test a few capabilities of PhantomJS on Ubuntu 15.04. The test case takes a few JavaScript files, creates a bundle, and invokes PhantomJS to serve these scripts. I could trace the execution till the bundle is uploaded. However after that I get "PhantomJS crashed" error. Apparently, there a no log files generated (or I couldn't locate them). Since I am not quite an expert in all this, I would like to know how I can debug this problem. Is there any way I can see what is going on with the PhantomJS?
Asked
Active
Viewed 106 times
1
-
This might help you. https://stackoverflow.com/a/44777274/2043297 – Artur Aleksanyan Jun 27 '17 at 09:58
1 Answers
0
You need to register event listener for messages being printed for any standard output to redirect to console.
page.onConsoleMessage = function (message) {
system.std.err.writeLine(message);
};

vishal8492
- 11
- 2