phpstorm

Visually distinguish auto-generated files?

别等时光非礼了梦想. 提交于 2019-12-31 04:03:31
问题 We have a bunch of files that are auto-generated based on the database model. I have had some facepalm experiences because I modified some code, only to find out my modifications where overwritten because I'd not noticed that my changes were in those generated files. So, I modified our generator to include a "do not modify" comment in the file header. This helps! Although, when tracing method calls, it's easy to end up in the middle of one of these files, and you wouldn't necessarily know

Visually distinguish auto-generated files?

≡放荡痞女 提交于 2019-12-31 04:03:24
问题 We have a bunch of files that are auto-generated based on the database model. I have had some facepalm experiences because I modified some code, only to find out my modifications where overwritten because I'd not noticed that my changes were in those generated files. So, I modified our generator to include a "do not modify" comment in the file header. This helps! Although, when tracing method calls, it's easy to end up in the middle of one of these files, and you wouldn't necessarily know

Errors running Laravel Dusk

南楼画角 提交于 2019-12-31 03:19:27
问题 I just discovered Laravel Dusk, and I was excited to use it in my project. However, it can't seem to get it to work. I followed the Laravel Documentation to install Dusk. When I run php artisan dusk in the terminal, I get [Symfony\Component\Process\Exception\RuntimeException] TTY mode is not supported on Windows platform. I found this (https://github.com/laravel/dusk/pull/13/files) which is supposed to fix it I think, but I still get the error. Also, I attempted to run the Dusk tests through

PhpStorm Startup task - php artisan serve

淺唱寂寞╮ 提交于 2019-12-31 02:55:46
问题 I am working with a project locally and I want to run "php artisan serve" with the PhpStorm's startup task feature every time I start the project. I went to Settings -> Tools -> Startup Tasks and clicked the green plus, then Add New Configuration . However, I don't know what to choose from there. There is no "artisan" option there. How should I do it? 回答1: Artisan is a php script so you can simply add a new PHP Script task: File: Browse to you project directory and select artisan . Arguments:

PhpStorm配置远程xdebug

谁都会走 提交于 2019-12-30 19:08:10
安装XDebug 安装就不细说了,攻略很多,这里主要讲配置。 安装攻略: 源码安装 xdebug,并在 vscode 中配置 php.ini配置: 注释掉的都可以不要 zend_extension=xdebug.so ; xdebug 的远程连接开关,必须开,关了就不发消息给IDE。 xdebug.remote_enable=1 ; 这个配置是2.9版之前的。我装的2.9,配了没用。phpstorm里也不需要配。 ; xdebug.remote_handler=dbgp ; 设为req,脚本启动马上连接IDE;设为jit,出现错误时才连接。默认就是req,所以不用配。 ; xdebug.remote_mode=req ; 客户端的地址,装IDE的电脑IP。(猜想配置了速度快些,因为不用去找了) xdebug.remote_host=10.0.31.208 ; 自动找IDE的地址,配置了这一项,xdebug.remote_host 会被忽略。更灵活,换了IP不用改配置。 ; xdebug.remote_connect_back=1 ; 客户端IDE的通信端口,连不上可能会被windows的防火墙挡住 xdebug.remote_port=9100 ; IDE密钥,不配置,就会给个默认值。配了就优先给这里。很多攻略强调了这个配置,实际可以不配。 ; xdebug.idekey

Highlighting js-code inside php file

只谈情不闲聊 提交于 2019-12-30 08:15:12
问题 I have a file script.js.php . It contains PHP and JavaScript code(the js depends on the php ). And it is to be included into a page as js-file. <script type="text/javascript" src="script.js.php"></script> Example of script.js.php <?php require_once 'functions.php' ?> var vars = { var1: 'value1', var2: 'value2', var2: '<?php echo phpFunction(); ?>' } Does anybody know, is it possible to make PhpStorm higlight JavaScript code within a PHP file without using script -tag? Maybe there is some kind

Is there a way to save just one file in PhpStorm?

╄→гoц情女王★ 提交于 2019-12-30 05:58:12
问题 My traditional workflow must be a little different to the PHPStorm default. I often work on multiple files at the same time and want to be able to save just one file when I've finished with it, without saving the others that I've modified. I've managed to turn off the auto-save feature. Now, when I edit files I get stars on the ones I've edited and they stay like that until I hit 'save'. So far so good. But when press CTRL-S to save, expecting it to save the one file I'm looking at so I can

PhpStorm: SCSS File Watcher Settings

淺唱寂寞╮ 提交于 2019-12-30 04:35:26
问题 I need help setting up my SCSS file watcher in PhpStorm. I'm on Ubuntu, I have PhpStorm 6, I have RVM with Ruby 1.9.3p194 and Sass 3.2.5. I've set my File Watcher options in, Settings >> File Watcher as follows: Once I had done that, I changed something in my .SCSS file but I got this error. ...-1.9.3-p194/bin/sass --no-cache --update style_update.scss:style_update.css /usr/bin/env: ruby: No such file or directory (I added three dots at the begin of the first line to make the line shorter) So

Stop PHPStorm from cutting/copying the entire line if nothing is selected

风格不统一 提交于 2019-12-30 03:17:06
问题 If I set the caret on a line and accidentally press Ctrl X or Ctrl C instead of Ctrl S , then the entire line is cut/copied, since there is no selection. This can be very annoying, and can often times destroy code in the clipboard which I wanted to paste. I'd expect nothing to happen if nothing is selected. How can this be turned off? 回答1: Go to Registry screen: Help | Find Action... and search for registry there Once there -- find and activate editor.skip.copy.and.cut.for.empty.selection

本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试

与世无争的帅哥 提交于 2019-12-29 12:04:01
不明白phpStorm+XAMPP+chrome组合的phpStorm配置XDebug的断点调试,很多种网页办法都看过了,可用,但没达预期。QQ群问,一个大牛很奇怪我都配置了怎么还不正确,很干脆地说远程协助。哈爽快人说爽快话给办利落的事,我还没说感谢呢大牛就直接说有事88。 今天me总算明白了,其实很容易理解的,休闲的时间把配置过程写了,顺便mark下,需要的人来看看。其实今天《爱你,万缕千丝》正在放映,我追看的,今天恰逢之元、天丘因家族利益出现大吵,所谓一部戏铺垫完、到了矛盾激化到极点、将要迎接剧终的时候,我写这个配置过程忘了看了竟然给,找空补上。希望这个配置过程你读起来像是一本故事,或者是拍拍砖: 我的安装环境:XAMPP版本号V3.1.0 ;phpStorm版本8.0.3;windowsxp 32bit。您老人家先过目一下,不然怕影响意义。 XAMPP、phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工程文件夹路径为D:\xampp\htocts\9999m。在phpStorm>File>open,找到9999m,点击确定,加载9999m到了phpStorm(安装环境路径根据需要自行更改,后面的配置内容也类似)。图1 1. 开始服务器端配置:安装好XAMPP,停止apache服务(注意,如果直接退出XAMPP