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

Cannot reattach to mern app after saving file #27794

Closed
chrisdias opened this issue May 31, 2017 · 4 comments
Closed

Cannot reattach to mern app after saving file #27794

chrisdias opened this issue May 31, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *not-reproducible Issue cannot be reproduced by VS Code Team member as described
Milestone

Comments

@chrisdias
Copy link
Member

Testing #27463

  • Linux Ubuntu 16.04 in Parallels, 2 proc, 4gig memory, 128mb graphics memory

  • Insiders build

  • Settings ensure that I do not have autosave on:

    "files.autoSave": "off"

  • launch.json (note runtimeExecutable is set to local nodemon):

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "protocol": "inspector",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/nodemon",
            "runtimeArgs": [
                "--inspect=9222"
            ],
            "program": "${workspaceRoot}/index.js",
            "port": 9222,
            "restart": true,
            "env": {
                "BABEL_DISABLE_CACHE": "1",
                "NODE_ENV": "development"
            },
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen"
        }
    ]
}
  • F5 to run/debug the app, takes some time for it to start

  • Edit server/dummyData.js (seems like any edit is fine, I simply added a new const content4

  • Save dummyData.js

    Result in terminal (note the Starting inspector on 127.0.0.1:9222 failed: address already in use):

[nodemon] files triggering change check: server/dummyData.js
[nodemon] matched rule: **/home/parallels/src/mern-starter/server/**/*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] server/dummyData.js

[nodemon] starting `node --inspect=9222 index.js`
[nodemon] child pid: 8501
Starting inspector on 127.0.0.1:9222 failed: address already in use
[nodemon] app crashed - waiting for file changes before starting...
cd /home/parallels/src/mern-starter ; env BABEL_DISABLE_CACHE=1 NODE_ENV=development /home/parallels/src/mern-starter/no
de_modules/.bin/nodemon --inspect=9222 index.js

Then I get this Error:

Get "Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1...)

@chrisdias chrisdias added this to the May 2017 milestone May 31, 2017
@weinand
Copy link
Contributor

weinand commented Jun 6, 2017

Cannot reproduce on macOS. Will now try to reproduce on ubuntu...

@weinand weinand modified the milestones: On Deck, May 2017 Jun 6, 2017
@weinand
Copy link
Contributor

weinand commented Jun 6, 2017

Cannot reproduce on ubuntu 16.04.

From the console output "Starting inspector on 127.0.0.1:9222 failed: address already in use" I suspect that a node.js process is already running on port 9222 from a previous session.

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues *not-reproducible Issue cannot be reproduced by VS Code Team member as described labels Jun 6, 2017
@chrisdias
Copy link
Member Author

I can reproduce this every time.

git clone https://github.com/Hashnode/mern-starter.git 
npm install 

launch.json:

{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "protocol": "inspector",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/nodemon",
            "runtimeArgs": [
                "--inspect=9222"
            ],
            "program": "${workspaceRoot}/index.js",
            "port": 9222,
            "restart": true,
            "env": {
                "BABEL_DISABLE_CACHE": "1",
                "NODE_ENV": "development"
            },
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen"
        }
    ]
}

27794

Is there anything else I can provide?

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Aug 21, 2017
@weinand
Copy link
Contributor

weinand commented Sep 17, 2018

I still cannot reproduce.

@weinand weinand closed this as completed Sep 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *not-reproducible Issue cannot be reproduced by VS Code Team member as described
Projects
None yet
Development

No branches or pull requests

2 participants