gpt4 book ai didi

javascript - VS2015错误 "Application is not currently attached to a script debug target that supports script diagnostics"

转载 作者:行者123 更新时间:2023-11-28 10:50:59 24 4
gpt4 key购买 nike

我使用 Visual Studio 2015 创建了 JSHTML5 空白应用程序。当在 VS 调试器中以“本地计算机”模式运行它时,我收到以下错误消息:

Application is not currently attached to a script debug target that supports script diagnostics

仅仅忽略错误是行不通的,因为至少断点和 console.log("text") 不起作用。

我在 VS 中有默认选项。我运行的是正常的 Win10,并且开启了自动更新。重装VS2015也没有解决问题。

最佳答案

这对我有用,尽管我做的事情略有不同。我使用 IE 11 从本地文件系统访问 HTML 文件时收到相同的错误消息(正在处理 HTML)。看来 IE 开发工具不太喜欢这种操作模式(为什么?!)。这是我的故事...

我本地 Windows 笔记本电脑上的文件:

c:\temp\test.html

可以在这些浏览器中打开:

URL: file:///C:/Temp/test.html (in chrome)
URL: C:\Temp\test.html (in IE 11)

在 Chrome 工具中,控制台中的命令可以毫无问题地运行,例如console.log("嗨");

在 IE 开发人员工具中,此操作失败并显示操作引用的消息。

我在笔记本电脑 (nginx) 上安装了反向代理,因此尝试通过 HTTP 提供文件,这解决了 IE 的问题。以下是我如何通过代理通过 HTTP 访问文件:

http://localhost:9092/temp/test.html

这里是我的 nginx.conf 供引用(但我希望任何其他代理都可以正常工作)...

worker_processes  1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 9092;
server_name localhost;
location /temp {
alias "C:/temp/";
}
}
}

关于javascript - VS2015错误 "Application is not currently attached to a script debug target that supports script diagnostics",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33464495/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com