Configuring Visual Studio Code for Drupal 8 Development.
Вставка
- Опубліковано 19 вер 2024
- In this video, I'll be setting up and configuring Visual Studio Code for Drupal 8 Development by setting up Xdebug and PHP Code Sniffer.
This video is made for a task of Google Code In.
Google Code-in is a contest to introduce pre-university students (ages 13-17) to open source software development. Since 2010, over 8100 students from 107 countries have completed work in the contest.
Thank you, this was helpful. I am not expert, but there may be a couple of issues. I think phpcs.standard is supposed to point to the ruleset.xml file, so on Windows that line would be something like "phpcs.standard": "C:\\Users\\MyName\\AppData\\Roaming\\Composer\\vendor\\drupal\\coder\\coder_sniffer\\Drupal\
uleset.xml". The phpcs.bat is instead pointed to by phpcs.executablePath, which is not in your example but may be necessary for the extension to function. So that line would be something like "phpcs.executablePath": "C:\\Users\\MyName\\AppData\\Roaming\\Composer\\vendor\\bin\\phpcs.bat",. Also, at 19:48, there is already a 'files.associations' section further up in your file, so "*.html": "twig" should be added in there, and then the warning disappears.
You stop just before a demo of what you can do now with all that setup....I can't get the breakpoints to work. Launch Chome is getting to the drupal site but none of my breakpoint are ever stopped at?
What is the problem your are facing? Have you created the launch. json file?
@@mokshit06 Yes. And when I press the "Launch Chome againt localhost" the website is shown in the Chrome browser and the Visual Studio Code is switching to debug console. But my breakpoints is not working. I try putting one in update.php and then on the website "run updates" but the website just goes though the update without stopping.
@@rgry I'm not sure of the reason for that. You could try using breakpoints in some other file.
@@mokshit06 ok, thanks for doing the video anyway :-)
@@rgry Thank you
I have designed a website it is ready & running. I want to add a CMS using the Drupal is it possible?
Have you built it using html and css? If so then you can change it to a Drupal theme using twig. You can find videos showing the process.
@@mokshit06 yes with some JS & I going to use PHP for the DB
As far as i know, you should be able to do the js part by changing the website to a Drupal theme. I'm not sure about the db though
how can connect you
video starts at 22:07