5.1.4.追蹤點
1.用途
除了有中斷點的功能, 也可以在中斷時印出指定的訊息
2.用法
1.在想要中斷/印出訊息的地方, 按右鍵 -> breakpoint -> Insert Tracepoint
2.設定視窗
這邊可以在輸入的地方輸入想要在output視窗印出的訊息, 可分為兩種:
1.預設訊息種類
a.在輸入框中輸入address: $ADDRESS, caller: $CALLER, stack: $CALLSTACK, function: $FUNCTION, pid: $PID, pname: $PNAME, tid: $TID, tanme: $TNAME, 取消Continue execution並按下OK
$ADDRESS: 當前指令的位置 $CALLER: 上一層函式名稱 $CALLSTACK: 當前的堆疊 $FUNCTION: 當前的函式名稱 $PID: Process Id $PNAME: Process 名稱 $TID: Thread Id $TNAME: Thread 名稱
b.DEBUG -> Start Debugging
c.檢視output視窗
2.區域變數
a.在輸入框中輸入變數, 並以中括號刮起來, 嘗試勾選Continue execution並按下OK
b.DEBUG -> Start Debugging
c.檢視output視窗
Last updated
Was this helpful?