How to debug a Thread-running application?
Hello,
How to debug a Thread-running application by Netbeans 5.0?
Although I set breakpoints to the method of the Thread, the debugger never step into it? What can I do?
The code for implementation is like this:
[01]publicclass MyClass
[02]{
[03]publicstaticvoid main(String[] args)
[04]{
[05]// Something do before ...
[06]myMehotd();// Debugger would step-and-stop at the breakpoint here I set for this line ...
[07]MyThread myThread =new myThread();
[08]myThread.start();
[09]// Something do after ....
[10]}
[11]
[12]private myMethod()
[13]{
[14]// Debugger would step-and-stop at the breakpoint(s) here I set for this method ...
[15]}
[16]
[17]class MyThreadextends Thread
[18]{
[19]public MyThread()
[20]{
[21]// something do it for object-construction
[22]}
[23]
[24]publicvoid run()
[25]{
[26]// Debugger never step-and-stop at the breakpoint(s) here I set for this method ...
[27]}
[28]}
[29]}

