VS2015 error “Application is not currently attached to a script debug target that supports script diagnostics”

↘锁芯ラ 提交于 2019-12-06 14:05:32

问题


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

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

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


回答1:


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...

File on my local windows laptop:

c:\temp\test.html

Can be opened in these browsers:

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

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

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

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

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



回答2:


I finally got this solved with the help of Jack-Zhai in msdn forum. So, the summary of my journey:-

Problem: - Running JS UWP blank app in debug mode & local machine w default settings in VS2015 generates a warning "Application is not currently attached to a script debug target that supports script diagnostics" into JavaScript console. Breakpoints do not work, adding console.log("here") does not write anything to console

Solution trial 1: - changing and playing with VS2015 settings; the problem still exists

Solution trial 2: - reinstalling VS2015; the problem still exists

Solution trial 3: - reinstalling Windows10 - all applications deleted but user data not - installing VS2015 => Problem solved; debugging blank app works, and console.log("test") works



来源:https://stackoverflow.com/questions/33464495/vs2015-error-application-is-not-currently-attached-to-a-script-debug-target-tha

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!