How to debug PhantomJS when working with karma

I am testing Jasmine, Karma and many browsers. I am currently debugging a test that fails only in PhantomJS.

I would like to debug this call, so I installed the PhantomJS custom launcher in karma, which runs it with the debug port open.

I can access the remote debugger in Chrome through this port, however it does not know anything about any of my test files. It reports "about: blank" and "localhost: 9876" (the karma server that Phantom hits), but when I try to debug this location, it does not show any of the source or Jasmine specification files.

Has anyone else seen this behavior? I read the PhantomJS docs on the remote debugging feature and does not shed any light on this problem, AFAIK.

+23
phantomjs karma-runner jasmine remote-debugging
source share
1 answer

I struggled a lot with this, it was not easy.

I ended up offering a change in karma-phantomjs-launcher . It has been merged and is now in the latest versions.

+9
source share

All Articles