package com.learning.多线程.栈针;
public class TestFrames {
public static void main(String[] args) {
Thread thread = new Thread() {
@Override
public void run() {
method1(20);
}
};
thread.setName("多线程DBUG");
thread.start();
method1(10);
}
private static void method1(int x) {
int y = x + 1;
Object o = method2();
System.out.println(o);
}
private static Object method2() {
Object o = new Object();
return o;
}
}
右键断点按钮选择Thread 后点击Done
然后项目以debug模式运行
点击按钮进入执行到内部方法, 目前主方法线程已经运行到第23行