Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger is not stopping/showing at the breakpoint in node v6.1.0 #6967

Closed
sandy081 opened this issue May 27, 2016 · 35 comments
Closed

Debugger is not stopping/showing at the breakpoint in node v6.1.0 #6967

sandy081 opened this issue May 27, 2016 · 35 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@sandy081
Copy link
Member

sandy081 commented May 27, 2016

  • VSCode Version: Alpha
  • OS Version: OSX 10.11.5

Steps to Reproduce:

Follow the steps in smoke test - Smoke Test Debugging Javascript section

  1. Open VS code with VSCode-Smoketest-Express project
  2. Go to debug view
  3. Put a break point in index.js file at line 6
  4. Start the application
  5. In the browser open the application page http://localhost:3000/

Expected: Debugger should stop at the break point and show all necessary debug information like call stack etc
Actual: Debugger stops but there is no visual representation that it is actually stopping, and no necessary info is shown.

Additional Information:
See the attached movie

http://g.recordit.co/0UV4elT3Cq.gif

  • It worked when I tested first time and later it was breaking sometimes as above. I used keyboard short cuts to stop and start the server. I do not know if it is something to do with this
@sandy081
Copy link
Member Author

@weinand FYI

@weinand
Copy link
Contributor

weinand commented May 27, 2016

@sandy081 what version of node are you using?

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label May 27, 2016
@weinand weinand self-assigned this May 27, 2016
@sandy081
Copy link
Member Author

@weinand its v6.1.0

@weinand
Copy link
Contributor

weinand commented May 27, 2016

@sandy081 I was not able to reproduce this on OS X 10.11 and node 6.1. The error that you see in the CALL STACK view is a V8 issue in node v6.x (node-inspector/node-inspector#864).
VS Code has a workaround for it, but that does not seem to work as reliably for you as for me. We will have to wait until the real fix for V8 appears in node v6.

@weinand weinand added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 27, 2016
@jnystrom
Copy link

I am seeing this behavior and I am running node v 4.4.3. I am seeing Code say "PAUSED ON BREAKPOINT" but I am not seeing any indication of the breakpoint or the data around it. The strange thing is that on some endpoints (express endpoints), the breakpoints work fine, and others not. I am on OSX 10.11.4.

@weinand
Copy link
Contributor

weinand commented May 31, 2016

@jnystrom what version of VS Code are you using?

@jnystrom
Copy link

jnystrom commented May 31, 2016

I am using the latest Insiders version. : 1.2.0-insider

@jnystrom
Copy link

I just tested it in the latest released version and I still see the issue. I can add breakpoints that hit, during the startup of my node app, but when I hit this express 'PUT' endpoint, I cannot see any breakpoints getting hit. I do see them getting hit on a 'GET' endpoint. I am possibly using a newer version of NPM that is newer than the version of node I am using.

@tmkn
Copy link

tmkn commented May 31, 2016

I have that problem too since upgrading vscode to 1.0.
I use vscode on windows, linux and mac with node 5.x and I get that behaviour on each platform ever since upgrading to 1.0
In case of the linux machine I also tried node 4.x, 5.x and 6.x and it did not make any difference.
I then reverted vscode back to a 0.9x version with node 6.x and it worked again.
So there must be something wrong with the 1.0 release as opposed to a possible node 6.x incompatibility.
I also tried the 1.2.0 insider but the problem still persists there.

@weinand
Copy link
Contributor

weinand commented Jun 3, 2016

The original problem is a symptom of a specific v8/node v6 issue (nodejs/node#6928) which has been fixed in node 6.2.1.
The other problems occur in any version and are unrelated to this issue (even if they show the same symptoms).

@sandy081 please verify that node 6.2.1 fixes your problem.

@weinand weinand closed this as completed Jun 3, 2016
@weinand weinand changed the title Debugger is not stopping/showing at the breakpoint Debugger is not stopping/showing at the breakpoint in node v6.1.0 Jun 3, 2016
@weinand weinand assigned sandy081 and unassigned weinand Jun 3, 2016
@jnystrom
Copy link

jnystrom commented Jun 3, 2016

@weinand can I get a link to the Issue(s) that have to do with these same symptoms?

@weinand
Copy link
Contributor

weinand commented Jun 3, 2016

@jnystrom #6164 or #5422

@tmkn
Copy link

tmkn commented Jun 3, 2016

just fyi, I updated to node 6.2.1 but the debugger is still not showing the breakpoint.
I tried it with 1.1.1 and the most recent insider as of today: 1.2.0 (7ccb21d)

@weinand
Copy link
Contributor

weinand commented Jun 3, 2016

@tmkn this bug is about that a breakpoint is hit but that the call stack view stays empty. Is this really the problem you are seeing? If not please create a new issue with detailed steps for how to reproduce the problem.

@tmkn
Copy link

tmkn commented Jun 3, 2016

@weinand Yes, I set a breakpoint but the stack view stays empty, I can press continue and by doing that the program then finishes correctly.

I just looked at the attached gif again and it behaves exactly the same however my call stack stays empty(there's no "No callstack available" message like in the gif).

Also certain breakpoints work, it's just those that in my case are set inside a handlebarsjs registerFunction won't show any information.

//breakpoints here work fine
hbs.registerHelper("include", () => {
    //any breakpoint here triggers this behaviour
});

If wanted I can try to isolate the behaviour to a short snippet for easy reproduction.
As I said it appeared ever since I upgraded to 1.0 regardless of os or node version.

@tallakh
Copy link

tallakh commented Jun 9, 2016

I can confirm the same issue here. The breakpoint is hit and the application pauses, but the call stack view is empty with an error message: "No call stack available (Cannot read property 'indexOf' of undefined)."

I'm using node 6.2.1 and vscode 1.2.0

@weinand
Copy link
Contributor

weinand commented Jun 9, 2016

@tallakh @tmkn do you have a (ideally small) reproducible case that I can investigate?

@jornki
Copy link

jornki commented Jun 9, 2016

I'm experiencing the same issue. The debugger stops, but it doesn't look like it's connected to any breakpoint and the call stack view is empty. I have tried different node versions but the problem persists. Using Visual Studio Code 1.2.0

I have also verified that the same breakpoints works in other IDE's like JetBrains WebStorm for instance.

@weinand
Copy link
Contributor

weinand commented Jun 9, 2016

@jornki it would be great if you could provide a reproducible case that I can investigate.

@weinand
Copy link
Contributor

weinand commented Jun 9, 2016

@tallakh you are hitting #7481

@tallakh
Copy link

tallakh commented Jun 9, 2016

@weinand Thanks, looking forward to a fix.

@weinand
Copy link
Contributor

weinand commented Jun 9, 2016

@tallakh the fix for #7481 is available in the next Insider build.

@rmagen
Copy link

rmagen commented Jul 24, 2016

This bug still occurs to me with the latest Insiders builds and the latest Node.js

@weinand
Copy link
Contributor

weinand commented Jul 24, 2016

@rmagen so when hitting a breakpoint you are seeing this message in the CALL STACK view?

df32104e-2e60-11e6-9a42-c19cc8b21997

@rmagen
Copy link

rmagen commented Jul 24, 2016

Yes.
I actually got it fixed just now by (I think) updating some babel libraries.

Thanks!

@SCBuergel
Copy link

The latest release of VS Code on both Windows and Ubuntu (with latest nodeJS 7) is still having this issue. It is extremely hard to reproduce and only seems to happen once the code base exceeds some complexity.

@waelemara
Copy link

waelemara commented Mar 28, 2017

I'm facing this issue, node version 6.9.3 and VS code version 1.10.2, When I put a breakpoint at the beginning of the code I can see the yellow bar and I can step into and over the code, however after using Promises and generators in different places in the code, the debugging stops to work. the application seems to pause where the breakpoint is set, but I can not inspect variables or step into or over the code.

do we have an update on this issue?

@weinand
Copy link
Contributor

weinand commented Mar 30, 2017

@waelemara the issue you are seeing is most likely #22015.
Please try the Insiders build.

@waelemara
Copy link

Hi @weinand, I have installed the latest version of VS Code Insiders, but unfortunately it is still not working, worth mentioning that I'm not using Electron, and the debugging protocol that I'm using is "legacy", not "inspector".

@molant
Copy link
Contributor

molant commented Apr 3, 2017

I'm with the insider using inspector and this happens mostly when using bluebird. I'm in node 7.6.

@weinand
Copy link
Contributor

weinand commented Apr 3, 2017

@waelemara What is the exact problem you are seeing?
And switching to "inspector" protocol doesn't help?

@shamoons
Copy link

I have a very similar issue with a complex Promise chain

    {
      "type": "node",
      "request": "launch",
      "protocol": "inspector",
      "name": "Update Chains",
      "program": "${workspaceRoot}/scripts/updateChains.js"
    }

@weinand
Copy link
Contributor

weinand commented Apr 24, 2017

@shamoons do you have a reproducible snippet that you can share with us?

@john-doherty
Copy link

Was this ever resolved?

@weinand
Copy link
Contributor

weinand commented Jul 5, 2017

Yes, pls see: #6967 (comment)

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests