Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spy-JS in WebStorm not capturing

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
like image 613
Pavel 'Strajk' Dolecek Avatar asked Apr 24 '14 11:04

Pavel 'Strajk' Dolecek


People also ask

How do I run a JavaScript file in WebStorm?

To run a script, open it in the editor or select it in the Project tool window, and then select Run <script file name> from the context menu. WebStorm creates a temporary run/debug configuration of the type Node. js. To run a test, click the gutter icon next to it or press Ctrl+Shift+F10 .

What is a JS spy?

Spy-js is a tool for debugging, tracing, and profiling JavaScript running on different platforms/browsers/devices as well as server-side Node. js applications. Spy-js recognizes source maps so you can trace applications with CoffeeScript and TypeScript code.


1 Answers

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).

like image 151
spy-js Avatar answered Sep 18 '22 14:09

spy-js