使用JDB调试程序

linux下运行jdb
[wladm@EZAADT001 pmssrc]$ /home/wladm/jdk1.6.0_27/bin/jdb -classpath . com.cnpc.pms.test.TestMain
Initializing jdb ...
> stop at com.cnpc.pms.test.TestMain:6
Deferring breakpoint com.cnpc.pms.test.TestMain:6.
It will be set after the class is loaded.
> run
run com.cnpc.pms.test.TestMain
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
> 
VM Started: Set deferred breakpoint com.cnpc.pms.test.TestMain:6

Breakpoint hit: "thread=main", com.cnpc.pms.test.TestMain.main(), line=6 bci=0
6           int a = 10;

猜你喜欢

转载自elvis4139.iteye.com/blog/2232922