public function setPaymentMethod($paymentMethod)
        $this->paymentMethod = $paymentMethod;
        $requestData = $this->getPaymentData($paymentMethod);

        echo "<pre>";


        return $this;

I'm not able to see on FireBug or it's neither printing on browser or neither in View Source.

Checkout page just shows Blank.

On any of the checkout pages, when you have combination of KnockOut & Web Template

Example: vendor\magento\module-paypal\view\frontend\web\template\payment\paypal-express-in-context.html

Whenever you do PHP echo or Javascript alert it's not gonna work. So how to check & debug?

Must say for me it's tough for now & time-consuming. In CorePHP can do easily but Magento 2 + Zend + KnockOut +++.

  • Have you checked all request inside console? some of the request is break and inside this request your data is display. – Rakesh Jesadiya Sep 29 '16 at 4:44
  • Already checked. Not breaking anything. – Ankit Shah Sep 29 '16 at 4:45
  • 2
    in the chrome, use Inspect and then in the Source tab select your file(ex. js or html) then Breakpoints lines you need, Refresh the page and it will stop at breakpoints and display results – sIiiS Sep 29 '16 at 14:39
  • You should use Xdebug for debugging PHP applications. It will make your job SO much easier. – dmatthew Mar 2 '17 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.