chrome devtool 開發者工具 控制檯歷史、斷點歷史 匯出全部、儲存

hrdom發表於2024-03-13

devtools://devtools/bundled/devtools_app.html

let localStorageObject = {}; // 建立一個空物件

for (let i = 0; i < localStorage.length; i++) {
const key = localStorage.key(i); // 獲取第 i 個項的鍵名
const value = localStorage.getItem(key); // 根據鍵名獲取對應的值
localStorageObject[key] = value; // 將鍵值對新增到物件中
}

copy(localStorageObject);

previouslyViewedFiles
sourcesSearchConfig
xhrBreakpoints
breakpointConditionHistory
consolePins
domBreakpoints
experiments
searchAsYouType
watchExpressions
breakpoints
networkSearchConfig
locallnspectorVersion
consoleHistory

參考

https://stackoverflow.com/questions/13763361/get-console-history

https://stackoverflow.com/questions/51802601/save-export-chromes-javascript-console-input-history

相關文章