0

Is it possible to create a breakpoint in a within a .html file with Visual Studio?

I get the option to create a breakpoint within a .js file but not within an .html file (even within the tag.

<html>


<body>
    <p> testing</p>
    <script type='javascript'>
    alert('testing');
    alert ('testing2');
    </script>
</body>
</html>

4
  • Your case is so rare that this probably isn't supported. I'd suggest move your code to a separate file. Commented Sep 6, 2018 at 23:17
  • @marzelin - are you saying that it's rare to have js inside an html page? Commented Sep 7, 2018 at 0:31
  • it's rare to debug js inside of an html file because they are (and should be for perf reasons) small & simple scripts. What do you need inline scripts for? Commented Sep 7, 2018 at 11:01
  • @marzelin I want to start the debugging in the html file. Commented Sep 13, 2018 at 21:12

1 Answer 1

1

Got to File -> Preferences -> Settings -> Debug ->debug.allowBreakpointsEverywhere = true

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.