在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

时间:2022-07-31 01:32:33

The question is almost all in the title: Today I was trying the new functionalities of VS2015. I focused on debugging Javascript direclty from VS and I started to put some breakpoints in my angular code.

问题几乎全在标题中:今天我正在尝试VS2015的新功能。我专注于从VS调试Javascript direclty,我开始在我的角度代码中添加一些断点。

If I start debugging with Firefox (the same happen with Chrome) they become empty circles and if I move the mouse on the message is that the symbols are not loaded. The only way I found debugging to work is using Internet Explorer.

如果我开始使用Firefox进行调试(Chrome也是如此),它们将变为空心圆圈,如果我在消息上移动鼠标,则表示未加载符号。我发现调试工作的唯一方法是使用Internet Explorer。

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

有没有办法绑定Firefox(或Chrome)进程以允许调试?

4 个解决方案

#1


2  

I know you can do it in Chrome so it should be possible in other browsers as well if they support remote debugging. Here is how you do it in Chrome. In the toolbar, click the button to get the dropdown of browsers to debug with and then click "Browse with...". Click "Add...", set Program to wherever Chrome is on your machine and set Arguments to --remote-debugging-port=9222. You can also set Incognito as I have to ignore cache but it is not required.

我知道你可以在Chrome中完成它,所以如果它们支持远程调试,它也应该可以在其他浏览器中使用。以下是您在Chrome中的操作方法。在工具栏中,单击按钮以获取要调试的浏览器下拉列表,然后单击“浏览...”。单击“添加...”,将程序设置为计算机上Chrome的位置,并将参数设置为--remote-debugging-port = 9222。您也可以设置隐身,因为我必须忽略缓存,但这不是必需的。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

Important! Chrome cannot be started before, Chrome needs to start fresh from Visual Studio otherwise debugging won't work.

重要! Chrome无法启动之前,Chrome需要从Visual Studio重新启动,否则调试将无法正常工作。

After this goto "Debug" -> "Attach to Process..." -> select the chrome instance with the title of your project or similar and then click Attach.

在此调用“调试” - >“附加到进程...” - >选择带有项目标题或类似项目的chrome实例后,单击“附加”。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

If everything works you can now Debug your Javascript in Visual Studio and use all Chrome features as well.

如果一切正常,您现在可以在Visual Studio中调试Javascript并使用所有Chrome功能。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

#2


1  

I'm not sure if VS 2015 still has the browser link technology, but in theory that should allow you to debug for other browsers. See Using Browser Link in Visual Studio 2013 for some hopefully helpful tips.

我不确定VS 2015是否仍然具有浏览器链接技术,但理论上应该允许您调试其他浏览器。请参阅在Visual Studio 2013中使用浏览器链接获取一些有用的提示。

#3


-1  

Yes, you can debug js code using some browser specific addons . FOr chrome, you can take an eye at https://developer.chrome.com/devtools/docs/javascript-debugging

是的,您可以使用某些特定于浏览器的插件来调试js代码。对于Chrome,您可以访问https://developer.chrome.com/devtools/docs/javascript-debugging

#4


-2  

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

您可以在visual studio 2015中尝试apache Cordova项目,它应该根据https://youtu.be/Fr9qRNzBYZc进行chrome调试

#1


2  

I know you can do it in Chrome so it should be possible in other browsers as well if they support remote debugging. Here is how you do it in Chrome. In the toolbar, click the button to get the dropdown of browsers to debug with and then click "Browse with...". Click "Add...", set Program to wherever Chrome is on your machine and set Arguments to --remote-debugging-port=9222. You can also set Incognito as I have to ignore cache but it is not required.

我知道你可以在Chrome中完成它,所以如果它们支持远程调试,它也应该可以在其他浏览器中使用。以下是您在Chrome中的操作方法。在工具栏中,单击按钮以获取要调试的浏览器下拉列表,然后单击“浏览...”。单击“添加...”,将程序设置为计算机上Chrome的位置,并将参数设置为--remote-debugging-port = 9222。您也可以设置隐身,因为我必须忽略缓存,但这不是必需的。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

Important! Chrome cannot be started before, Chrome needs to start fresh from Visual Studio otherwise debugging won't work.

重要! Chrome无法启动之前,Chrome需要从Visual Studio重新启动,否则调试将无法正常工作。

After this goto "Debug" -> "Attach to Process..." -> select the chrome instance with the title of your project or similar and then click Attach.

在此调用“调试” - >“附加到进程...” - >选择带有项目标题或类似项目的chrome实例后,单击“附加”。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

If everything works you can now Debug your Javascript in Visual Studio and use all Chrome features as well.

如果一切正常,您现在可以在Visual Studio中调试Javascript并使用所有Chrome功能。

在Visual Studio 2015中有没有办法使用Internet Explorer以外的浏览器调试Javascript?

#2


1  

I'm not sure if VS 2015 still has the browser link technology, but in theory that should allow you to debug for other browsers. See Using Browser Link in Visual Studio 2013 for some hopefully helpful tips.

我不确定VS 2015是否仍然具有浏览器链接技术,但理论上应该允许您调试其他浏览器。请参阅在Visual Studio 2013中使用浏览器链接获取一些有用的提示。

#3


-1  

Yes, you can debug js code using some browser specific addons . FOr chrome, you can take an eye at https://developer.chrome.com/devtools/docs/javascript-debugging

是的,您可以使用某些特定于浏览器的插件来调试js代码。对于Chrome,您可以访问https://developer.chrome.com/devtools/docs/javascript-debugging

#4


-2  

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

您可以在visual studio 2015中尝试apache Cordova项目,它应该根据https://youtu.be/Fr9qRNzBYZc进行chrome调试