In addition to Shamit Verma's answer:
When debugging multi-threaded Java applications, itβs best not to use standard breakpoints that only suspend the thread where the breakpoint is set. Defining a standard breakpoint in your application will break only the associated thread. Other threads will still work. In eclipse, the debugger for some reason causes the debugger to skip breakpoints if other threads are already running.
Java debugging solution:
Define a breakpoint in the desired thread (@Run () method, which I expect ..), right-click on the breakpoint -> breakpoint properties.
In the breakpoint properties dialog box, select the Suspend VM check box instead of Pause Stream.
If you do this, your virtual machine will be suspended if a breakpoint is reached.
In C / C ++ CDT, use set-scheduler- lock on :
As @Employed Russian says in an answer to another question , the GDB command:
set scheduler-locking on
will cause other C / C ++ threads to remain paused while the current thread is running. This command can be executed in Eclipse / CDT Debug, pausing the program and opening the "Debugger Console" perspective and entering: set scheduler-lock on. Later it can be returned to normal with: set scheduler-lock off
See the GDB Documentation for more information on scheduler lock and non-stop mode, which allows other threads to work when one thread stops.
Erik Kaju Mar 28 2018-12-12T00: 00Z
source share