如何在Visual Studio书签或行中添加注释? [英] How can I add a note to a Visual Studio bookmark or line?

查看:174
本文介绍了如何在Visual Studio书签或行中添加注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调试过程中,我经常发现不止一个可以改进(或固定)的领域,我喜欢将它们标出一段距离,以便以后再进行改进.

When I am in the middle of debugging I often find more than one area that can be improved (or fixed) and I like to mark them in such away that I can come back later and make the improvement.

当前,我向该行添加了一个书签,但是其中不能包含任何可用来提醒我该书签为何存在的注释(您可以更改书签的名称,但这还不够).我想我确实希望能够在代码运行时向代码添加TODO,但是尽管

Currently I add a bookmark to the line but this can't include any notes that can be used to remind me why the bookmark was there (you can change the name of the bookmark but this isn't enough). I suppose I really want to be able to add a TODO to the code while the code is running but although Edit and Continue is enabled it is not available in the ASP.NET WebForms (3.5) project.

是否有任何可以启用此功能的Visual Studio功能或扩展?

Are there any Visual Studio features or extensions that will enable this?

推荐答案

您可以创建

Instead of enabling Edit and Continue then entering a TODO: into the source code, you can create a Task List Shortcut (key cord Ctrl + K, Ctrl + H).

这会将一个条目添加到任务列表"窗口的快捷方式"部分.从那里可以更改任务的描述,以提醒您创建它的原因.

This adds an entry to the Shortcuts section of the Task List window. From there you can change the description of the task to remind you why you created it.

这篇关于如何在Visual Studio书签或行中添加注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆