Delphi 2010“调试会话正在进行中”后如何继续。终止?信息?
我经常收到“调试会话正在进行中。终止吗?”消息。当在 Delphi 2010 中进行例行编辑后尝试重新运行我的应用程序时。我的应用程序已经运行(可能多次)并退出,没有任何问题回到我的编辑模式,但完成编辑后,有时运行选项被禁用,我收到此“调试会话正在进行中。终止吗?”信息。然后我必须小心保存我的编辑,然后使用 Windows 的“关闭窗口”来中止 Delphi 并重新启动 IDE。我的应用程序非常大并且使用 FastMM4。我想消除问题,但会很高兴有一种更简洁的方式将调试器与它所锁定的任何东西分离。有什么建议吗?
顺便说一句,我的应用程序完全编译(并使用)Delphi 7 进行发布,在其中我完全没有任何问题,即使我在执行应用程序的过程中按 Ctrl-F2 也没有问题。
I am getting a lot of occurences of the message "Debug session in progress. Terminate?" when trying to re-run my application after routine editing in Delphi 2010. My Application has already been run (maybe several times) and quits without any problem back into my editing mode, yet after completing my edit sometimes the Run option is disabled and I get this "Debug session in progress. Terminate?" message. I then have to be careful to save my edits, and then use the Windows 'Close Window' to abort Delphi and restart the IDE. My Application is quite large and uses FastMM4. I'd like to eliminate problem but would be happy with a neater way of detatching the debugger from whatever it is latched on to. Any suggestions?
Incidently, my App compiles fully (and is released using) Delphi 7 in which I have no problems at all, not even when I Ctrl-F2 from within the middle of executing my App.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的应用程序中的某些线程可能仍在运行,从而使您的应用程序无法完全终止,从而使调试会话保持活动状态。根据应用程序的状态以及应用程序终止过程的其余部分,在这种情况下,IDE 的标题中仍可能显示“正在运行”。
frogb 关于按 Ctrl-F2 的问题是(我猜)看看情况是否确实如此。如果您在应用程序完全终止时按下 Ctrl-F2,则不会发生任何事情。但是,如果某个线程仍然处于活动状态并保持调试会话处于活动状态,则 Ctrl-F2 应终止它,并且如果 IDE 的标题显示“正在运行”,该标题现在应该消失。
事实上,即使您的应用程序仍在运行并正确结束,您也可以在 D7 中按 Ctrl-F2,这是可以预料的。这正是 Ctrl-F2 的用途:结束所有仍在运行的线程(我可能会粗略地补充一下)。
Chances are some thread in your app is still running keeping your appl from terminating fully and thus keeping the debug session alive. Depending on the state of your app and the rest of the app's termination process, you could in that case still have "running" in the IDE's caption.
frogb's question about hitting Ctrl-F2, was (I am guessing) to see whether that was indeed the case. If you hit Ctrl-F2 when your app is fully terminated, nothing should happen. However, if some thread is somehow still active and keeping the debug session alive, Ctrl-F2 should terminate it and if your IDE's caption showed "running" that should now disappear.
The fact that you can hit Ctrl-F2 in D7 even when your app is still running and have it end correctly is to be expected. That is exactly what Ctrl-F2 is for: ending all still running threads (pretty roughly I might add).
您确定您的应用程序及其所有线程已完全终止吗?如果返回编辑模式时按 Control-F2 会发生什么?当您执行此操作时,主窗口标题是否有任何变化?
Are you sure your application and all its threads have completely terminated? What happens if you press Control-F2 when you get back to edit mode? Is there any change in the main window caption when you do this?
我可以解决这个问题(这种情况不会发生太多),但我有进一步的信息显示一些捕获的图像中的问题。这是程序停止后我看到的..注意灰色的“从程序中分离”..
然后出现下一组消息,导致被迫终止 IDE...
I can work around the problem (it does not happen too much) but I have further information showing the problem in some captured images. This is what I see after the program is stopped..note the greyed out 'Detatch from program'..
Then this next set of messages appear, leading to being forced to terminate the IDE...
也许菜单项“运行/从程序中分离”?
Perhaps the menu item Run/Detach from Program?