本論文提出一個Java的多緒靈活除錯器,內建開架式介面。它以語法樹的語法單元作為基本除錯單位,程式員可以逐語法單元評估每一步的執行結果,還可以自行調整下一步除錯所需的步伐(pace)大小。當主題程式中斷執行時,開架式介面可以支援程式員直接取用執行期的物件資料,或是當下呼叫另外一個副程式。為了確保主題程式可以從中斷狀態恢復執行,程式員所寫的測試碼都以新建的執行緒執行。本系統還提供管理多緒程式的功能,程式員可以利用本系統來對多緒程式進行除錯。 In a program development environment, programmer will test main program after implementation. A debugging process is involved if the test result does not meet the specification. Popular Integrated Development Environment (IDE) normally build-in a common debugger which debugging unit is a line. When program error occurs in a complex expression, the common debugger is hard to meet programmer’s expectation when debugging. The debugger executes code follow by the control flow that is written, the programmer is unable to invoke another testing method while debugging. They have to repeatedly exit executing program, then modify testing code, and run it again.
This master thesis proposed a Multi-Thread Flexible Debugger for Java, which build-in Open-Access Interface, and use syntax unit as its debugging unit. Programmer now can execute every single syntax unit, and watch the result. The size of next debugging pace can be adjusted. An Open-Access Interface helps programmer access object data or executes testing codes in the runtime. In order to guarantee the program can be resumed from suspend, all testing code are executed by another new thread, which is managed by multi-thread managing mechanism.