VS2015错误“应用程序当前未附加到支持脚本诊断的脚本调试目标” [英] VS2015 error "Application is not currently attached to a script debug target that supports script diagnostics"

查看:575
本文介绍了VS2015错误“应用程序当前未附加到支持脚本诊断的脚本调试目标”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I created JS & HTML5 Blank App with Visual Studio 2015. When running it in VS debugger in "Local Machine" mode, I get the following error message:


应用程序当前未附加到脚本调试目标,
支持脚本诊断

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

只是忽略错误是不可行的至少是断点和 console.log(text)不工作。

Just ignoring the error is not workable as at least breakpoints and console.log("text") do not work.

我在VS中有默认选项。
我正在运行正常的 Win10 ,自动更新。
重新安装VS2015没有解决问题。

I'm having default options in VS. I am running normal Win10, with automatic updates on. Reinstallation of VS2015 did not solve the issue.

推荐答案

这对我来说很有效,尽管我做的事情略有不同。我使用IE 11访问我的本地文件系统的HTML文件(正在使用HTML),得到相同的错误消息。似乎IE开发者工具不太像这种操作模式(为什么?!)。这是我的故事...

This worked for me although I was doing something slightly different. I got the same error message using IE 11 accessing a HTML file from my local file system (was mucking around with HTML). Seems IE developer tools don't much like this mode of operation (why?!). Here's my story...

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

File on my local windows laptop:

c:\temp\test.html

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

Can be opened in these browsers:

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

在Chrome工具中,控制台中的命令可以没有问题,例如
console.log(hi);

In Chrome tools commands in the console can be run no problem e.g. console.log("hi");

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

In IE developer tools this fails with the message cited by the op.

我的笔记本电脑上安装了一个反向代理(nginx),所以尝试通过HTTP提供文件,这样可以解决IE的问题。以下是通过代理通过HTTP访问文件的方式:

I had a reverse proxy installed on my laptop (nginx) so tried serving the file up via HTTP and this fixed the issue with IE. Here's how I would access the file via HTTP via the proxy:

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

有关这里的引用,我的nginx.conf(但任何其他代理,我期望工作正常)...

For reference here's my nginx.conf (but any other proxy would I expect work fine)...

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/";
        }
    }
}

这篇关于VS2015错误“应用程序当前未附加到支持脚本诊断的脚本调试目标”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆