简体   繁体   English

Eclipse在获取会话代码时暂停而没有断点

[英]Eclipse pausing without a breakpoint on getting session code

While debugging, my Eclipse pause on same line every time. 在调试时,我的Eclipse每次都在同一行上暂停。 I read this Eclipse pausing without a breakpoint , but there are no exceptions in my console. 我读了这个没有断点的Eclipse暂停 ,但是在我的控制台中没有例外。 I also read this Why does my Eclipse project have phantom debugger breakpoints? 我也读过这个为什么我的Eclipse项目有幻像调试器断点? , but it doesn't help too. ,但它也没有帮助。

The code that pauses debugger without breakpoint is this: 暂停没有断点的调试器的代码是这样的:

Query query = sessionFactory.getCurrentSession().createQuery(hql);

I think there's no problem with createQuery() . 我认为createQuery()没有问题。 Whenever getCurrentSession() called, my Eclipse pauses. 每当调用getCurrentSession() ,我的Eclipse都会暂停。 Why is this happening? 为什么会这样?

Sometimes I face this kind of problem and everytime I end up finding out that my java code is not synchronized with my .class, this happens when I'm in remote debugging. 有时我遇到这种问题,每当我发现我的java代码与我的.class不同步时,就会发生这种情况,当我正在进行远程调试时。 Try to close your eclipse, clean your project and then try again. 尝试关闭你的日食,清理你的项目,然后再试一次。 If you're debugging remotely, update your source codes. 如果您正在远程调试,请更新源代码。

Cheers! 干杯!

Look into concurrency. 研究并发性。 Maybe ur running into situations like deadlock. 也许你遇到像死锁这样的情况。 It happens when two objects are not locked in the same order, causing two different threads to be waiting for each other to release other object. 当两个对象未按相同顺序锁定时会发生这种情况,导致两个不同的线程等待彼此释放其他对象。

At this point it appears that the entire program has paused. 此时似乎整个程序已暂停。 Maybe its whats happening, but cant say for sure until I can see the code. 也许它最近发生了什么,但是直到我能看到代码才能肯定地说。

Simple. 简单。 Application always multithreading.. Obvously that application stop in another thread. 应用程序总是多线程..显然应用程序停止在另一个线程中。 When you analyze on which tread Eclipse stop and click on this thread - you found that Eclipse starts to react on command. 当您分析Eclipse停止哪一步并单击此线程时 - 您发现Eclipse开始对命令做出反应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM