question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug in `ChromeDebuggingAttachment` settings

See original GitHub issue

Very nice tool.

Is it possible to use the VSCODE attach to the live server? Or to Launch the Live server from the launch.json . If so , how does one do that? Or is there a fundamental limitation that I have to use the Chrome Debugger (which I really don’t mind, I just wanted to see if I could use the VSCODE debugger also).

Launch.json

{
    "version": "0.2.0",
    "configurations": [

        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Live Server",
            "url": "http://localhost:5500/WorkBench/Workbench.html",
            "webRoot": "${workspaceRoot}"
        },
        {
            "type": "chrome",
            "request": "attach",
            "name": "Attach to Live Server",
            "port": 5500,
            "webRoot": "${workspaceRoot}"
        }
    ]
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ookilcommented, May 5, 2020

Hi I’m not sure if I’m missing something but it still doesn’t seem to work for me and I get that same message: Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222).

What I did was: in setting.json: "liveServer.settings.ChromeDebuggingAttachment": true

in launch.json:

{
    // Use IntelliSense to learn about possible 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": "chrome",
            "request": "attach",
            "name": "Attach to Chrome",
            "port": 9222,
            "webRoot": "${workspaceFolder}"
        },
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:5500",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

and In the “target” field of Chrome, appended --remote-debugging-port=9222

1reaction
DrYSGcommented, Nov 30, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

chrome.debugger.attach doesn't work with youtube. - Monorail
2. Open youtube in a tab. ... }); 4. Click cancel in the "extension started debugging this browser" popup. ... 6. Open youtube...
Read more >
Visual studio debugger won't attach to chrome
I'm trying to attach to an instance of chrome running a react page, using node as a server. I want to attach to...
Read more >
Using chrome.debugger.attach throws error "Cannot attach to ...
I'm currently writing a Google Chrome extension that uses the Chrome Debugger to log network activity (among other things).
Read more >
chrome.debugger - Chrome Developers
Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the...
Read more >
Debug Mode | Nearby Notifications - Google Developers
How do I use debug attachments / how do I test my attachments? ... Debug mode also enables more detailed bug reports, which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found