Replies: 14 comments
-
It sounds like you're expecting |
Beta Was this translation helpful? Give feedback.
-
Why it does not happen automatically if there is only one running thread within |
Beta Was this translation helpful? Give feedback.
-
Or alternatively, if there is only one thread running the code of currently open projects? |
Beta Was this translation helpful? Give feedback.
-
Personally, I don't see the benefit in doing this, and on only the simplest projects could it do anything useful. I'm also not sure it's a bug. Moving to feature request, but leaving open in case anyone thinks it's something worth pursuing. |
Beta Was this translation helpful? Give feedback.
-
Can you justify your conclusion that the projects, which do not have most of the time multiple threads running at the same time the code which is currently open, are "only the simplest projects"? |
Beta Was this translation helpful? Give feedback.
-
Yes, I can. Still, it's not about convincing me, it's about either putting in a pull request or convincing someone else that this is a feature worth looking. And on that basis, reopening. |
Beta Was this translation helpful? Give feedback.
-
I do see that Pause , pauses all the threads, and you can examine the execution stack on each and every thread. Usually there are a handful of them. I would not want to inspect each and every one where it has stopped. It is also a pretty rare use case to do in a debugger (when hunting on a bad concurrency issue). So if anyone would like to contribute such a functionality, please consider that as optional. |
Beta Was this translation helpful? Give feedback.
-
Did you even read what this issue was about? It was specifically about the case with a single thread running. Actually running, as in using CPU by going through the user code. Something deemed by your friend as "only a simplest project". Which would make Netbeans itself even more simple than "only a simplest project" because normally it takes 0% CPU. |
Beta Was this translation helpful? Give feedback.
-
There's always more than a single thread in NetBeans itself, even when the IDE is using minimal CPU. It's even less clear to me what you think this should be doing now. |
Beta Was this translation helpful? Give feedback.
-
I closed this issue seeing how the discussion is going. Ok, maybe they think it is useless, not a problem. Then you reopen it to talk about "any thread" in an answer to a message which said clearly that it is not about "any thread". In IntelliJ, and most IDEs which I used, pausing navigates directly to a thread. But not to any thread. There is some logic to make it useful. I asked about a feature commonly implemented in other IDEs for user's convenience. See for example here https://www.youtube.com/watch?v=lAWnIP1S6UA&t=54s |
Beta Was this translation helpful? Give feedback.
-
NetBeans does a similar thing as long as the thread you're interested in is made current. Above you linked running threads to CPU usage (in the context of NetBeans itself), but that doesn't correlate to the most logical or useful thing to do. It's not clear what you think is the logical thing to do! Possibly we could make You might be better looking at this? https://netbeans.apache.org/kb/docs/java/debug-multithreaded.html#_suspending_threads |
Beta Was this translation helpful? Give feedback.
-
I would just like to have a similar experience to what other IDEs do. Maybe I cannot explain it clearly for some reason. For example, because a running thread may mean either "not suspended" or actually running (R) on the system level. I used it in the second sense. Imagine that there is a complex Spring application with dozens of threads marked as running in Then, As there is only one such thread and thus, there is no ambiguity, then apart from suspending all threads, the editor navigates to the suspended line in that one thread. Even web multi-user applications, when tested offline, may frequently have either none or a single thread type in question. Even more so, a test application of some mathematical code. But if there were multiple such threads, NB could behave exactly as now, giving thus a hint to the user that there is an ambiguity. To make the hint even more clear, NB could select the That's how I would see it, but an actual NB developer might see additional possibilities and design it differently/better. But then, lack of such a feature is not critical and thus, there is probably a higher priority work, given the project's size. |
Beta Was this translation helpful? Give feedback.
-
Alternatively, the whole method could be used only if there is no current thread and only to select one. |
Beta Was this translation helpful? Give feedback.
-
But in an application with a pool of threads, is not the current thread eventually pointing to something random? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Apache NetBeans version
Apache NetBeans 16
What happened
Did "Pause" actually ever go to the paused statement, as in case of other IDEs? I may be wrong, but I seem to recall that it was the case. Now it works just never, no matter which project. Pressing "Pause" stops the execution, enables the "Continue" button and the latter is the only visible effect. I still have no idea which code line or even thread has been paused.
How to reproduce
Just run the debugger and press "Pause". It may be an Ant single-thread project, a Maven project with multiple user threads, does not matter.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Ubuntu 20.04
JDK
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
Beta Was this translation helpful? Give feedback.
All reactions