How to debug in ko template in magento 2?


<div data-bind="text: ko.computed(function() { debugger; })"></div>

Print Data

<div data-bind="text: ko.toJSON(method.method_code)"></div>

Docs from Magento:

There is one another great tool available for debugging knockout js data in chrome browser.

Knockoutjs context debugger

Add Knockoutjs context debugger in chrome browser. You can see a new tab added Knockout context at the right panel in Elements tab where you can check knockout data of selected element.

Check Screenshot:

enter image description here