Azure   发布时间:2019-11-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了VS 远程调试 Azure Web App大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

studio 一贯以功能强大、好用著称,当然可以通吃基于 Azure 应用的创建、发布和调试。接下来就让我们一起看看如何使用 Visual studio 远程调试部署在 Azure 上的 Web App,以及一些常见的注意事项。

先检查一下使用的 Azure SDK 版本和 Visual studio 的版本。根据 MSDN 的介绍,Azure 的远程调试功能是在 Azure SDK 2.2 中加入的,所以请确保您的机器上安装了 2.2 或者是更新的 Azure SDK。studio 的版本问题,MSDN 上的描述也很有趣。大意是使用 Visual studio 2012 已经可以远程调试 Azure 上的 Website 了,但是 Visual studio 2013 又对此做了很多的提升。个人理解最好使用 VS2013,或者更新的版本。update3 和 Azure SDK 2.9。

studio 调试另外一台机器B上运行的一个程序 myapp (机器B上没有安装 visual studio),我们不仅要把附带 pdb 文件的 myapp 程序部署到机器B上,还要在机器B上运行一个调试辅助程序 msvsmon.exe。运行 msvsmon.exe 后,Visual studio 就能够 attach 住 myapp 并使用其 pdb 文件进行调试。这就是 Visual studio 的远程调试功能。而 msvsmon.exe 程序必须与特定版本的 Visual studio 相匹配才能工作,所以它被集成在 Visual studio 的安装包中,用时去 Visual studio 的安装目录中搜索就能找到。

只不过我们需要通过云端的配置来指定 msvsmon.exe 对应的 Visual studio 版本,并告诉云端打开一些调试所需的端口。

yment credentials

又可以用来远程调试。

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/63ed894f5e0e8a79b82f95036e0cbff2.png" >

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/6fe1697537a872691eda4c3ccb4c7232.png" >

Tings 中的远程调试为允许状态,并指定用于远程调试的 Visual studio 版本。相关内容已经在原理部分讲过,这里说些需要注意的内容:

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/54a0d164ebf42734ec23a34c7a34d394.png" >

studio 的调试功能依赖于编译过程中产生的 pdb 文件。下面的设置就是让 Web App 在发布时编译为 debug 版本并产生对应的 pdb 文件。现在的 Visual studio 已经可以智能的去找 pdb 文件了,所以这里我们不用关心 pdb 文件是被发布到了云端还是保存在本地(简单就好)!

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/979c23574c25244566ec9de002dd57e4.png" >

Tings 中选择 Configuration 为”Debug”:

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/a94253d7018b937b7a8a7b7dec7801a3.png" >

http://”的部分,然后在弹出的对话框中输入我们在最开始处创建的用户名和密码

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/50b3604643c102c25c9b108c0159343c.png" >

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/77f683d8dabbaab3468ee217468fb497.png" >

可能需要等待上那么一小会儿…

title="VS 远程调试 Azure Web App" alt="VS 远程调试 Azure Web App" src="https://cn.js-code.com/res/2019/02-09/09/eb5c0883ea6a2d819a0115970ca493d0.png" >

可能需要多试几次才能成功。调试的过程中速度也是个问题,感觉还是有点慢。用这个功能(可能是测试人员),此时不要太吃惊喔!

大佬总结

以上是大佬教程为你收集整理的VS 远程调试 Azure Web App全部内容,希望文章能够帮你解决VS 远程调试 Azure Web App所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: