标签:
PHPStorm 调式JS /同时调式PHP和jS
一、PHPStorm 调式Javascript
在PHP Storm中创建test.html
Test pagevar test;
var test2;
console.log("hello world!");
console.log("hello world3!");
Test
在test.html 文件中右键
选择Debug ‘test.html‘ .
此时Chorme浏览器会提示安装JetBrain IDE Support。选择安装即可。
这样就可以在PHPStorm 中调式js了。
如下图,在PHp storm中按F8执行下一步
二、PHP Storm同时调式php和js
创建php文件
Test pageTest
test click
echo ‘
‘;
echo ‘This is php code‘;
echo ‘This is php code2‘;
?>
其中tt为js文件
var test;
var test2;
console.log("hello world!");
console.log("hello world3!");
function testClick(){
console.log("test1");
console.log("test2");
}
在PHP Storm配置如下:
设置好断点后启动调式即可。
参考
标签: