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

stopOnEntry not working #31267

Closed
ewrayjohnson opened this issue Jul 22, 2017 · 16 comments
Closed

stopOnEntry not working #31267

ewrayjohnson opened this issue Jul 22, 2017 · 16 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster

Comments

@ewrayjohnson
Copy link

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:34:09.706Z)
  • OS Version: Windows_NT ia32 6.1.7601
  • Extensions:
Extension Author (truncated) Version
typings-installer ben 0.2.0
jsrefactor cms 1.3.0
typings-autoinstaller jvi 1.2.0
debugger-for-chrome msj 3.1.6
loopback-json-schemas seq 1.0.0

The default "stopOnEntry' behavior has been changed to "stopOnEntry": true and "stopOnEntry": false, set in launch.json is ignored.


Steps to Reproduce:

  1. Run Node.js application in debug - note debugger stops on first line.
  2. Edit lauch.json and add "stopOnEntry": false to the configuration. Repeat Open Source VS Code #1

Reproduces without extensions: Yes

@vscodebot vscodebot bot added new release debug Debug viewlet, configurations, breakpoints, adapter issues labels Jul 22, 2017
@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand same issue here

@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

What version of node?

@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand v8.2.1

@weinand weinand assigned roblourens and unassigned weinand Jul 23, 2017
@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

I cannot reproduce with this code:

console.log("hello");

Debugging does not break on the first line if the launch config has no "stopOnEntry" attribute or if the value is set to false.

@weinand weinand added the info-needed Issue requires more information from poster label Jul 23, 2017
@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand,

My setup is the following,

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to node",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "smartStep": true,
      "restart": true,
      "sourceMaps": true,
      "stopOnEntry": false,
      "timeout": 60000,
      "internalConsoleOptions": "neverOpen"
    }
  ]
}

When I connect to the running node --inspect-brk bin/start.js, it stops right at the first line disrespecting the value of "stopOnEntry".

Any thoughts?

@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand,

Or don't I simply see the use case of "stopOnEntry" in my scenario.

@ewrayjohnson
Copy link
Author

ewrayjohnson commented Jul 23, 2017

Node 7.4.0

@roblourens
Copy link
Member

roblourens commented Jul 23, 2017

Was an exception thrown? Can you share the code?

@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

Does it make a difference if you add a "protocol": "inspector" to your launch config?

@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

@ewrayjohnson does it make a difference if you add a "protocol": "legacy" to your launch config?

@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand,

Stops on entry with:
{ "protocol": "inspector", "stopOnEntry": true }
{ "protocol": "inspector", "stopOnEntry": false }
{ "protocol": "inspector", "stopOnEntry": false, "protocol": "inspector" }

Node: v8.2.1, vscode 1.14.2

@igrek8
Copy link

igrek8 commented Jul 23, 2017

@weinand,

If legacy:

Cannot connect to runtime process (reason: This socket has been ended by the other party).

Due to debugging node with inspector.

@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

@ewrayjohnson how does your launch config look like?

@weinand
Copy link
Contributor

weinand commented Jul 23, 2017

@crabicode node 8.x no longer supports "legacy" protocol.

Please note: I suspect that @ewrayjohnson's issue is totally unrelated to the issue of @crabicode.
@ewrayjohnson uses node 7.4 (which uses the "legacy" protocol) and @crabicode uses node 8.2.1 (which uses the "inspector" protocol). The underlying debugger implementations are independent.
So it does not really make sense to discuss them in one issue.

@ewrayjohnson to be 100% sure: you are seeing this issue even if you add "protocol": "legacy" to your launch config (@crabicode: this question is irrelevant to you, please don't answer).

@weinand weinand self-assigned this Jul 23, 2017
@ewrayjohnson
Copy link
Author

ewrayjohnson commented Jul 23, 2017 via email

@weinand weinand removed their assignment Aug 18, 2017
@roblourens
Copy link
Member

In microsoft/vscode-node-debug2#144 I made some changes to prevent an issue like this. It's not totally fixed but if you're seeing the same thing, it may work more often. Let me know if it's still an issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 7, 2018
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 info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants