a) Navigate to system console  b) Search for the service DAY CQ HTML Library Manager (or Granite HTML Library Manager) and open the settings for the same c) Check the checkbox which says Debug Console d) In the text box which says Debug Init Script define a js variable window.AF_log_config with the value "a7-b7-c7-d7". To know what this value represents have a look at Log Configuration e) Save the settings. f) Open any Guide and the logger will be enabled
Note: Support for sending logs to server is not available
Say, you are writing a calculate expression to compute a field's value, then you can add debugger; keyword before the actual business logic,
Hope this answer's your questions. Let me know if you need any further help.