首页 > 解决方案 > 在 Visual Studio Code 的 HTML 文件中的脚本中创建 .js 断点?

问题描述

是否可以使用 Visual Studio 在 .html 文件中创建断点?

我可以选择在 .js 文件中创建断点,但不在 .html 文件中(甚至在 tag.js 文件中)。

<html>


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

标签: visual-studio-code

解决方案


转到文件 -> 首选项 -> 设置 -> 调试 ->debug.allowBreakpointsEverywhere = true


推荐阅读