0

I'm using 'npm start' that works as follows:

"watch": "tsc -w",
    "prestart": "npm run build && func extensions install",
    "start:host": "func start --cors *",
    "start": "npm run start:host & npm run watch",

This works great, but I can't attach to it through vscode, by launch.json:

{ "name": "Attach", "type": "node", "request": "attach", "cwd":"${workspaceFolder}", "protocol": "auto", "port": 9229 }

When I try to attach I get the error:

enter image description here

1 Answer 1

0

This seems like a Chrome issue with vs code.You must launch Chrome with remote debugging enabled in order for the extension to attach to it.

I have posted an answer for the similar issue with a different scenario, please try and see if it works for you.

You must launch Chrome with remote debugging enabled in order for the extension to attach to it.

Windows

Right click the Chrome shortcut, and select properties In the "target" field, append --remote-debugging-port=9229 Or in a command prompt, execute /chrome.exe --remote-debugging-port=9229

OS X

In a terminal, execute /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9229

Linux

In a terminal, launch google-chrome --remote-debugging-port=9229

https://github.com/Microsoft/vscode-chrome-debug

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.