简体   繁体   中英

Debug Javascript in VS 2017 without [dynamic] window

I recently lost the ability to step through Javascript code without having a separate [dynamic] window containing the same file pop up while debugging. This is extremely annoying for several reasons, of which the primary three are:

  1. I frequently make edits to the [dynamic] window by accident, where they are ignored.
  2. Debugging tooltips do not work in the [dynamic] window.
  3. Pressing F12 to jump to a variable/function definition does not work.

I came across an old post addressing this issue but none of the proposed solutions helped. I know what I want is possible because only a month ago my Visual Studio did not behave like this.

I am using VS 2017.

You could enable the option "Enable JavaScript debugging for ASP.NET(Chrome and IE)" under TOOLS->Options->Debugging.

And then debug your app with breakpoint in your JavaScript, view the result in your side.

在此处输入图片说明

Check if not then enable the option "Enable JavaScript debugging for ASP.NET(Chrome and IE)" under TOOLS->Options->Debugging in VS 2017

Then debug with Chrome browser ( or IE) like :

在此处输入图片说明

Now if you add break point in your .js file it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM