Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.37k stars 431 forks source link

Launch in debugger via .vscode #291

Closed zipzit closed 5 years ago

zipzit commented 5 years ago

I'm relatively new to Polymer. I'd like to understand what's going on under the hood with this repo. I'm hoping to run in debug mode in VSCode. I'm having a terrible time getting the regular start to function, nevermind any testing modes...

Can anyone share their /.vscode/launch.json contents?

My launch.json contents (total fail):

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch via NPM",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
               "start"
            ],
            "port": 4444                      ### Debug port to attach to, Default is 5858 
        }
    ]
}

Generally error code looks like Visual Studio Code -- Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:XXXX) For whatever port I randomly choose.

If I used port 8081, that really fails big. polymer no start 2 port 8081

The system works just fine via normal $ npm start type commands from the command line, still leaving me in the dark as to what's going on behind the scenes. As appropriate, can anyone share a functional .vscode/launch.json file contents? Many thanks.

ref: Windows 10, VS Code 1.29.1

keanulee commented 5 years ago

We don't use the "launch in debugger" function in VS Code; we just use npm start with CLI and use the debugger with developer tools in the browser. Patch welcome, but not considering this as an issue.