一、PHPStorm调试Javascript
在PHPStorm中创建test.html
- nbsp;html>
Test page var test; var test2; console.log("hello world!"); console.log("hello world3!");Test
登录后复制
在test.html 文件中右键。
立即学习“PHP免费学习笔记(深入)”;
相关推荐:《PhpStorm使用教程》
选择Debug ‘test.html’ .
此时Chorme浏览器会提示安装JetBrain IDE Support。选择安装即可。
这样就可以在PHPStorm中调式js了。
如下图,在PHPstorm中按F8执行下一步。
二、PHPStorm同时调式php和js
创建php文件
- nbsp;html>
Test page Test
test click<?php 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");}
登录后复制
在PHPStorm配置如下:
设置好断点后启动调式即可。
以上就是phpstorm怎么用js的详细内容,更多请关注【创想鸟】其它相关文章!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。