Is there a way in Visual Studio 2015 to debug Javascript using a browser other than Internet Explorer?

The question is almost all in the title: Today I tried to use the new features of VS2015. I focused on debugging Javascript direclty from VS, and I started putting some breakpoints in my angular code.

If I start debugging with Firefox (the same thing happens with Chrome), they will become empty circles, and if I move the mouse to the message, this means that the characters are not loaded. The only way to find debugging to work is to use Internet Explorer.

Is there a way to bind a Firefox (or Chrome) process to enable debugging?

+8
javascript debugging visual-studio visual-studio-2015
source share
4 answers

I know that you can do this in Chrome, so it should be possible in other browsers if they support remote debugging. Here's how you do it in Chrome. On the toolbar, click the button to open debugging browsers, and then click "Browse with ...". Click "Add ...", install the "Program" to where Chrome is located on your computer, and set the "Arguments" to --remote-debugging-port=9222 . You can also install Incognito, since I have to ignore the cache, but this is not required.

enter image description here

Attention! Chrome cannot be started earlier, Chrome should start working with Visual Studio, otherwise debugging will not work.

After that, goto "Debug" → "Attach to Process ..." → select an instance of chrome with the name of your project or similar, and then click "Attach".

enter image description here

If everything works, you can now debug your Javascript in Visual Studio and use all the features of Chrome.

enter image description here

+2
source share

I'm not sure VS 2015 still has browser link technology, but theoretically this should allow you to debug other browsers. See Using browser links in Visual Studio 2013 for some hopefully helpful tips.

+1
source share

Yes, you can debug js code using some browser add-ons. For chrome, you can take a look at https://developer.chrome.com/devtools/docs/javascript-debugging

-one
source share

You can try the apache Cordova project in visual studio 2015 and it should have chrome debugging at https://youtu.be/Fr9qRNzBYZc

-2
source share

All Articles