1.列印
var num=0;console,log(num);
2.彈框
彈框的時候,會把資料轉為字串
var obj=;alert(obj);
3.詳細輸出
var box =document.getelementbyid("box"
);console.dir(box);
4.提示框
如果點選的是確定,返回值救贖true,如果點選的是取消,返回值是false
var res =confirm(「你準備好了沒有?」);console.log(res);
5.返回值
如果點選的是確定,返回的就是你輸入的內容,如果點選的是取消返回值就是null
var res=prompt(「你是男孩還是女孩」);console.log(res);
gdb常用的除錯方法
1.安裝gdb yum install gdb 2.列印執行緒的堆疊 1,ps afx 檢視程序id 2,attach 正在執行的程序 gdb debugme pid 3,set logging file tmp test.txt 設定操作gdb的日誌輸出檔案 set logging on 開啟日誌...
strace除錯的常用方法
一 將strace結果輸出到檔案 1 格式 o filename 或 2 filename 2 實戰 root localhost charpter05 strace c o test.txt test88 root localhost charpter05 strace c test 2 test...
Matlab的常用除錯方法
m程式偵錯程式的熱鍵設定和vc的設定有些類似,如果使用者有其他語言的程式設計除錯經驗,則除錯m程式顯得相當簡單。因為它沒有指標的概念,這樣就避免了一大類難以查詢的錯誤。不過,m程式可能會經常出現索引錯誤,如果設定了 stop if error breakpoint 選單下 則程式的執行會停在出錯的位...