Question

I'm using WebStorm 8 with Spy-js integration
(more http://blog.jetbrains.com/webstorm/2014/04/spy-js-webstorm-secret-service/)

When I run SpyJS from IDE Run configuration, I cannot get it to capture requests

configuration

When I access URL via Local Proxy mode, http://localhost:3546/?spy-js=localhost:9000 it works, but with its limitations... (more https://github.com/spy-js/spy-js#local-proxy)

System proxy seems to be configured correctly:

enter image description here

Content of http://localhost:3546/spy-js-proxy.pac is

function FindProxyForURL(url, host) { return "PROXY localhost:3546; DIRECT"; }

Trace proxy log from WebStorm

/usr/local/bin/node /opt/homebrew-cask/Caskroom/webstorm/8.0.0/WebStorm.app/plugins/spy-js/server/spy.js --port=3546
session store created: /var/folders/gm/r9vjzd1926v4sxdv54c9tl240000gn/T/spy-js-session114324-29723-1xl36wv
Starting 8 workers..
info: socket.io started
spy-js has started, proxy is available at http://localhost:3546
session (qzj9e): new session created: qzj9e
session (qzj9e): dynamic config created: /var/folders/gm/r9vjzd1926v4sxdv54c9tl240000gn/T/114324-29723-1yo5izj.js
session (qzj9e): new session started: qzj9e
Worker 29770 ready.
Worker 29768 ready.
Worker 29769 ready.
Worker 29771 ready.
Worker 29773 ready.
Worker 29772 ready.
Worker 29774 ready.
Worker 29775 ready.
proxy connection issue: socket hang up
Was it helpful?

Solution

First, try clearing "URL to trace" field (it's optional), restart the tracing session and force refresh the page. If it works, it might be the URL issue (try using localhost instead of 0.0.0.0).

Also, if you're using Chrome, when tracing session is running make sure chrome://net-internals/#proxy page "Effective proxy settings" is using spy-js-proxy.pac (if not, try re-applying the settings or clearing bad proxy list on the page if any).

OTHER TIPS

Disable chrome extensions that affect your proxy settings.

I was using a VPN Chrome extension, and it was affecting chrome proxy settings (I didn't see PAC script: http://localhost:3546/spy-js-proxy.pac in chrome://net-internals/#proxy, and reapplying settings wasn't helping).
Simply disabling it helped, now everything is working well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top