我在 Visual Studio 中基于受源代码控制的代码库进行开发。当我从存储库中提取最新更改时,我的断点和书签现在与代码不同步。有什么办法可以让他们保持同步吗?
(In case it matters, I'm using Perforce for source control - though considering switching to git for reasons unrelated to this question.)
I develop in Visual Studio on a codebase that's under source control. When I pull the latest changes from the repository, my breakpoints and bookmarks are now out of sync with the code. Is there any way of getting them to stay in sync?
(In case it matters, I'm using Perforce for source control - though considering switching to git for reasons unrelated to this question.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
断点设置在文件中的特定行号处(23、147、11679)。如果其他东西在 Visual Studio 之外更改了这行代码,那么它无法知道该代码是否可能被移动,即使它做了,它会将断点移动到哪里?
我认为更改源代码控制提供商不会影响这一点。
有“在功能处中断”命令:
这允许您设置相对于函数开头的断点函数而不是文件中的位置。
The breakpoint is set at a specific line number in the file (23, 147, 11679). If something else changes this line of code outside Visual Studio then it has no way of knowing that the code as potentially moved and even if it did where would it move the break point to?
I don't think changing source control provider will affect this.
There is the "Break at Function" command:
This allows you to set a break point relative to the start of a function rather than an position in a file.