Chrome debugging extension VsCode Chrome will not work even after uninstalling the application in 2 files

I am on Windows 10. I was not lucky to get an Angular2 application that works with the VsCode Chrome debug extension. I disconnected the application before the Angular application with only two files, but still did not succeed.

My breakpoints do not fall, and I still get an error: cannot connect to the execution process, timeout after 10000 ms - (reason: it is not possible to connect to the target: connect to ECONNREFUSED 127.0.0.1:9222) "

These are my current two source files:

index.html

<!DOCTYPE html>
<html>
<body>
<h1>External JavaScript</h1>
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it now</button>
<p><strong>Note:</strong> myFunction is stored in an external file called "myScript.js".</p>
<script src="myScript.js"></script>
</body>
</html>

MyScript.js

function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; }

My launch.json file contains:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Chrome against localhost, with sourcemaps",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:3000",
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}"
        },
        {
            "name": "Attach to Chrome, with sourcemaps",
            "type": "chrome",
            "request": "attach",
            "port": 9222,
            "sourceMaps": true,
            "webRoot": "${workspaceRoot}"
        }
    ]
}

lite-server . , IE, . " http://localhost:3000/" . ( IE? Chrome?)

IE, Debug VsCode. " Chrome localhost...". F5, . Chrome "localhost: 3000".

, , VSCode: ": , 10000 - (: : ECONNREFUSED 127.0. 0,1: 9222)"

, " Chrome...". " Chrome...". , Chrome F5.

, node.js VsCode, - .

+4
1

Chrome . "target" --remote-debugging-port=9222 , /chrome.exe --remote-debugging-port=9222.

0

Source: https://habr.com/ru/post/1661360/


All Articles