C# 程序在没有断点的情况下冻结

发布于 2024-08-30 09:02:31 字数 115 浏览 3 评论 0原文

我正在实现一个程序,该程序从各个站点获取文本并检查哪些站点与查询最相关。问题是,当我的代码中有断点时,它工作得很好,但如果没有断点,程序就会冻结。这是内存问题吗?请问我可以做什么来解决这个问题?

谢谢

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

城歌 2024-09-06 09:02:31

也许避免程序崩溃的不是断点,而是应用程序停止的时间。
也许插入一些“睡眠”会让你对正在发生的事情有一些有用的了解。

当您的程序与在幕后执行异步调用或可能忙等待的第三方库交互时,可能会发生这种情况。

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.

小…红帽 2024-09-06 09:02:31

我也遇到过类似的问题。在“选项”->“调试”->“常规”中禁用“启用属性评估和其他隐式函数调用”改变了问题。对我来说,它让它一直冻结,更容易调试。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文