![]() ![]() with the coming project Loom, this might become untenable. If you have an app with a very high thread count, this might be a problem, e.g. Here we have full access to the stack as we had before, but we can see all the threads. We can see the stack by expanding a particular thread (e.g. The threads effectively become the top-level element. But when we have a thread heavy application, this view becomes a lifesaver. This is off by default as the UX is difficult and most developers don't need this for typical apps. To enable that mode, we need to check the "Threads" option in the IDE in the debugger view: But if the process that you're debugging has complex concurrency, this might improve your experience noticeably! I guess this is the reason it isn't the default UI. The downside is that it's a bit more noisy by comparison. ![]() Luckily, most IDEs support a view that's more oriented to heavily threaded apps. are unclear when looking at this widget only. Additional details such as grouping, location, etc. It's very hard to gauge the state of a specific thread by looking at the combo box. It's a very effective tool, but it also provides a very limited view. This widget lets us toggle the current thread and with it the stack that we're looking at. If you've used JetBrains IDEs such as IntelliJ, you're probably familiar with the thread combo box that lives above the stack trace panel in the UI. Once you learn how to master these resources, things like deadlock detection will become trivial. Debuggers have so many amazing tools to control their environment. That's throwing the baby with the bathwater. Instead of modifying the debugging technique, developers blame the tooling. As a result, you can no longer reproduce the problem with a debugger. You place a breakpoint and a thread that might deadlock is suspended in the background. Multithreaded DebuggingÄebugging in a multi-threaded environment is often perceived as difficult because it's hard to know what's going on. Today we'll discuss the process of debugging threading issues, dealing with deadlocks and race conditions in the debugger. ![]()
0 Comments
Leave a Reply. |