1

Hi There

In Visual Studio Code, I'm trying to debug/breakpoint a simple HTML file with some JavaScript.

I'm using VS.Code, installed with extension "Live server", and "Debugger for Chrome" to a Google Chrome browser.

The problem is I cannot set any breakpoint in VS.Code HTML-file nor at Chrome DevTools to inspect the code (Says: !--Code injected by live-server--), so is there a wise head, there can help me here ?

Cheers Jan

NB: I have looked at this topic, but it doesn't concern VS.Code: How to set breakpoints in inline Javascript in Google Chrome?

VS.Code - Chrome Browser

1 Answer 1

2
"debug.allowBreakpointsEverywhere": true

Which will let you set breakpoints in any file, valid or not. I haven't tested it yet with HTML files but that might be a good workaround.

See also: https://github.com/Microsoft/vscode-chrome-debug/issues/122

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

2 Comments

Seems not to be working any more. VS Code 1.34.0, Debugger for Chrome 4.11.3
This worked fine for me, once I updated my launch file to point to the right HTML page also.

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.