15

有趣的阅读 - 12个提高生产力的Visual Studio调试技巧

 3 years ago
source link: https://zhuanlan.zhihu.com/p/162767091
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

有趣的阅读 - 12个提高生产力的Visual Studio调试技巧

计算机图形学话题下的优秀回答者

前因为工作的关系,接触过不少程序员同行,发现很多同学对所谓的小技巧tips感兴趣。本文就是一篇很有趣的文章,总结介绍了12个关于“宇宙第一IDE”—— Visual Studio的实用技巧。善加利用这些小技巧,能够在使用Visual Studio进行调试时更加简单方便。

下面是几个小例子,比如说调试代码时让代码自动运行到光标所在的代码行。

v2-83c99880d3ed5c94233bce2b264ff239_b.jpg

调试代码时显示线程

v2-ed2700b6426ff45355478e7aa690ff88_b.jpg

以及从16.5版开始,Visual Studio 2019可以将已编译的程序集的IL代码反编译为一些C#源代码以便于调试。

v2-16497db540a14f705a5633c567ceca13_b.jpg

具体内容可以查阅原文。

全文分为以下几个部分:

  • Run to Cursor
  • Run through here with a mouse click
  • Set next statement to here
  • Data breakpoint: Break when value changes
  • Conditional breakpoint
  • Trace breakpoint
  • Track Objects that Are Out-Of-Scope
  • View values returned by functions
  • Reattach To Process
  • No-Side-Effect evaluation in Immediate Window and in the Watch Window
  • Show Threads in Source
  • Debug source code decompiled from IL code

原文标题:

12 Visual Studio Debugging Productivity Tips

文章链接:

http://weixin.qq.com/r/1kORidTELIlTrZDq9xbE (二维码自动识别)

v2-c46eaeb7ecbeda51ed0f1ad0f28e42fb_b.jpg



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK