Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I just had exactly the same problem. After half a day debugging NTVS, Nodejs and V8 engine, managed to figure out the issue. I have raised a <a href="http://code.google.com/p/v8/issues/detail?id=3067" rel="nofollow">bug with V8 team</a>, and <a href="https://nodejstools.codeplex.com/workitem/578" rel="nofollow">posted to NTVS team</a> on resolution as well. It can be fixed by both, although V8 debugger is the real culprit.</p> <p>You can <a href="http://code.google.com/p/v8/issues/detail?id=3067" rel="nofollow">read</a> the details of the report to NTVS team, but here's the short version. Essentially Attach to Process dialog leaves V8 debugger agent in inconsistent state, because the way it does detection of the debugee process is to issue socket connect with immediate disconnect (to test that host/port combination is valid). This doesn't play well with the debugger agent, and it enters a state where it thinks it has a debugging session established when it doesn't. So all subsequent connections to it fail (such as when you click the Attach button on the 'Attach to Process' screen). This is why Visual Studio flickers and nothing seems to happen.</p> <p>There are two workarounds for 'mocha' in particular:</p> <ol> <li><p>Invoke through RemoteDebug.js proxy (included with NTVS)</p> <p><strong>NOTE:</strong> invoking "_mocha" rather than "mocha"!<br> <strong>NOTE:</strong> in VS you will have to connect to <em>ComputerName:5858</em> rather than <em>localhost:5858</em></p> <pre><code>node RemoteDebug.js -breakatentrypoint .\node_modules\.bin\_mocha </code></pre> <p>Or, if like me, you have mocha installed as a global npm package:</p> <pre><code>node "%VS120COMNTOOLS%\..\IDE\Extensions\Microsoft\Node.js Tools\1.0\RemoteDebug\RemoteDebug.js" -breakatentrypoint "%APPDATA%\npm\node_modules\mocha\bin\_mocha" </code></pre></li> <li><p>OR ALTERNATIVELY, after you see the node process in Attach to Process window, just before clicking Attach, restart the mocha command to reset the V8 debugger agent (then hit Attach without refreshing)</p></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload