New Project from Existing Files
New to PHPStorm, and I am still having problems with this, so I wonder if anyone could come online and walk me through creation of 3 new projects from existing files.
I have various projects, that I am trying to bring into PHPStorm. These 3 projects all start in different ways.
One is simple http://project1/index.php
One has files below public_html
One is a subdomain, which calls files from the main domain.
All 3 work fine in browser via xampp and virtual hosts.
Working on live sites is an issue for the future!
What I have seen of PHPStorm, I really like, so I want to get into it, but it is just taking me too long to get started.
Happy to pay for your time.
Please sign in to leave a comment.
Hello,
Do you face any particular issues with PhpStorm?
What problems did you encounter exactly?
I am not clear how to add a project *correctly* from existing files, and debug it.
I am using Windows 7, XAMPP, virtual hosts. Everything works fine with a browser.
I have managed to add a project, but it won't debug, and just seems to run tests - although I have not added any tests.
For example, I have added a project. Before starting, I run the program from a browser http://coach2, and everything is fine.
Load PhpStorm, load the project, select Run - Debug Coach2.
At the bottom, I see "Instantiating tests... " "Testing started at 10:15 ...
C:\xampp\php\php.exe -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 C:\develop4\coach\v2storm\phpunit-5.7.25.phar --no-configuration C:\develop4\coach\v2 --teamcity"
(I don't recognise "--teamcity", phpunit-5.7.25.phar is in the correct place)
I only see the output html in PhpStorm, I don't see the PHP code. I have set Run -> Break at first line in PHP Scripts, but it doesn't. And without the PHP source, I can't set any break points.
At some point, I see a choice of browsers (top right), click on Firefox, and see the page in Firefox, displayed correctly.
But then I try again, Run -> Debug Coach2 - and all I see is the test framework message, but no code, and no output
And now, I am just confused...
You have created a Run/Debug Configuration of the wrong type. The one you have is for PHPUnit. For web app (debugging via browser) you would need to create it manually ("Run | Edit Configurations..." or via drop-down box next to the Run/Debug buttons on toolbar) -- the most appropriate type here would be "PHP Web Application"
https://www.jetbrains.com/help/phpstorm/creating-and-editing-run-debug-configurations.html
In general: https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm
>But then I try again, Run -> Debug Coach2 - and all I see is the test framework message, but no code, and no output
You will have to delete that wrongly-created entry.
Thanks, that helped a lot.
I just have one more issue, and will create a new thread for that