Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In phpStorm, how to put javascript breakpoint in a php file

I am new at the software phpStorm.

When I edit a html file, I can put break point on the javscript part, by clicking on the left of the code editor.

However, when I edit a php file, it doesn't work. It works only to put a break point on the php part of the code.

How can I put javascript break point on my php files?

like image 434
Oli Avatar asked Mar 14 '12 00:03

Oli


1 Answers

Add a debugger; line to your JavaScript code. For example:

alert("First.");
debugger; // Trigger a breakpoint.
alert("Second.");
like image 164
icktoofay Avatar answered Sep 27 '22 23:09

icktoofay