執行紀錄
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Ads 指令碼會在預覽模式和實際執行中顯示兩種執行記錄:變更記錄和記錄輸出。
- 變更紀錄
變更記錄會顯示指令碼對 Google Ads 實體執行的所有變更:實體說明、變更類型、變更前後的值,以及錯誤 (如果有的話):
變更紀錄可以進一步篩選為只顯示錯誤。
- 記錄輸出
如果在指令碼中執行 console.log("Hello world!");
,記錄中會顯示「Hello World!」。記錄文字在偵錯時特別實用,但通常也能在即時執行作業中派上用場。假設下列指令碼已排定每天執行:
let spreadsheet = SpreadsheetApp.create("Daily Report");
// Populate the spreadsheet.
// ...
console.log("Daily report ready!");
console.log(spreadsheet.getUrl());
在每次執行時,指令碼會記錄新建試算表的網址,以便日後尋找。您也可以使用 console.warn()
或 console.error()
記錄記錄中的橘色或紅色文字。
除了使用程式設計師指定的記錄訊息外,Google Ads 指令碼執行期間遇到的錯誤和警告也會顯示在文字記錄中。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-02-23 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]