1

I am new to using the Laravel framework. I want to use VS Code for debugging my Laravel project. How do I Launch my Laravel project in VS Code?

1 Answer 1

3

Open the folder in VS Code.

If you are using Homestead press Ctrl+J (on Windows) or Cmd+J (on macOS), then type vagrant up. Otherwise type php artisan serve.

Sign up to request clarification or add additional context in comments.

9 Comments

Jasper, after launching the Laravel project in VS Code, where to do I go to debug the project. I don't have a clue where to start? Do I open the index.php file and in Debug select "Launch Currently Open Script"?
For debugging a php project i myself use some create extensions. Go too the extensions tab on the left. And install PHP intelephense. After indexing your project it will read out all syntax errors and more. Duplicate function names, wrong test names. It works great for debugging
I think what you are trying to do is run php inside your vs code? Since you need apache for that youll need alot of modifying to run it. Maybe try this? laravel.com/docs/master/homestead#per-project-installation
I think i found what you are searching for! Install PHP debug it utilyses the php Xdebug extension! PHP Debug marketplace.visualstudio.com/…
This is what I've done: I have installed PHP Debug. In the VS Code terminal I "vagrant up" and confirm it is running. In VS Code "Debug" window I ensure it says "Listen for XDebug". I then select "Start Debugging". What is supposed to happen next? Is there a specific file in the Laravel project that should be focused or that I should be running "Start Debugging" from? What am I missing?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.