官术网_书友最值得收藏!

Tools

Good debugging tools are essential when you're trying to discover where problems lie. You could write your own crude timing code, and we will show you how to get started with this. However, purpose-built tools are much nicer to work with than simply logging lines of debug information. VS 2017 includes some very useful Application Insights tools that make helpful information easily visible.

Many of the tools discussed in this chapter help you examine areas external to your code. We will cover the profiling of code too, but it's hard to identify problems this way unless the work is purely computational. Slowdowns often happen because of actions your app initiates outside of its immediate stack, and these can be hard to debug by simply stepping through the code. VS 2017 can show you what external actions your app takes, for example, triggering an HTTP API call.

Moving through your program line by line slows down the execution so much that it can make it difficult to identify which lines are fast and which are slow. However, VS does display the time taken since the previous debug step, which can help with this. Nevertheless, the same approach taken for fixing functional bugs cannot always be applied to fix performance issues.

主站蜘蛛池模板: 甘孜| 汉中市| 柏乡县| 松原市| 峨眉山市| 体育| 年辖:市辖区| 洞口县| 河曲县| 横山县| 泰顺县| 阿拉善左旗| 南投市| 南城县| 彩票| 凌云县| 舞钢市| 阿坝| 泽州县| 湖口县| 太白县| 开原市| 武宁县| 神池县| 横峰县| 英山县| 永胜县| 广平县| 米泉市| 澳门| 拉孜县| 逊克县| 衡山县| 元朗区| 吉木乃县| 福鼎市| 辽宁省| 夏河县| 平凉市| 奉新县| 宁强县|