C# 程序在没有断点的情况下冻结
我正在实现一个程序,该程序从各个站点获取文本并检查哪些站点与查询最相关。问题是,当我的代码中有断点时,它工作得很好,但如果没有断点,程序就会冻结。这是内存问题吗?请问我可以做什么来解决这个问题?
谢谢
I'm implementing a program which gets text from various sites and checks which ones are most relevant to a query. The problem is that when I have breakpoints in my code it works perfectly well but without it, the program just freezes. Is this a memory issue? What can I do to solve this please?
THanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许避免程序崩溃的不是断点,而是应用程序停止的时间。
也许插入一些“睡眠”会让你对正在发生的事情有一些有用的了解。
当您的程序与在幕后执行异步调用或可能忙等待的第三方库交互时,可能会发生这种情况。
Perhaps it's not the breakpoints that avoids your program from crashing, but the amount of time the application is stopped.
Perhaps inserting some "sleep" will give you some useful insight about whats going on.
This may happen when your program interacts with thrid party libraries that behind the scenes performs asyncronous calls, or mays busy waits.
我也遇到过类似的问题。在“选项”->“调试”->“常规”中禁用“启用属性评估和其他隐式函数调用”改变了问题。对我来说,它让它一直冻结,更容易调试。
I have had a similar problem. Disabling "Enable property evaluation and other implicit function calls" in Options->Debugging->General changed the issue. For me it made it freeze all the time, much easier to debug.