Closed benjifisher closed 10 months ago
I think the third commit is not useful. I misunderstood the instructions in https://ddev.readthedocs.io/en/stable/users/debugging-profiling/step-debugging/#ide-setup:
Update the project’s
.vscode/launch.json
to add the “Listen for Xdebug” configuration from this config snippet. For more on customizinglaunch.json
, see the VS Code docs.
Or maybe I misunderstood the VS Code docs.
What works:
hwp-curie/.vscode/launch.json
using the recommended code snippet.~/Library/Application Support/Code/User/settings.json
, inserting the recommended snippet.What does not work: adding ~/.vscode/launch.json
.
To do: figure out the right place to put the file for global config, update the installation script to update settings.json
, or add a file to the Drupal repo.
At some point, I used Homebrew to install PHP on the host. I forget: maybe I did not see how to install the Xdebug plugin, or activate it, without doing that. Or maybe I was having trouble starting an Xdebug session. I should test removing PHP from my Mac so that we can just use the version on the Docker containers.
In order to start an Xdebug session, a key step is to open the repository. For example, "Open Folder..." from the VS Code application's File menu. Editing a file in the repo is not enough.
Carole's list of plugins (not all of which she uses):
╰─$ ls -1 ~/.vscode/extensions
andrewdavidblum.drupal-smart-snippets-2.1.0
bmewburn.vscode-intelephense-client-1.10.2
clemenspeters.format-json-1.0.3
dmitrydorofeev.empty-indent-0.2.0
extensions.json
ikappas.composer-0.8.0
juniormucciolo.drupal-7-snippets-0.0.7
marcostazi.vs-code-drupal-0.0.12
mblode.twig-language-2-0.9.4
ms-azuretools.vscode-docker-1.28.0
ms-python.isort-2023.10.1
ms-python.python-2023.22.1
ms-python.vscode-pylance-2023.12.1
ms-toolsai.jupyter-2023.11.1100101639-darwin-arm64
ms-toolsai.jupyter-keymap-1.1.2
ms-toolsai.jupyter-renderers-1.0.17
ms-toolsai.vscode-jupyter-cell-tags-0.1.8
ms-toolsai.vscode-jupyter-slideshow-0.1.5
ms-vscode-remote.remote-containers-0.327.0
neilbrayfield.php-docblocker-2.7.0
pauloamgomes.drupal7-hooks-snippets-0.0.2
ritwickdey.liveserver-5.7.9
tsega.drupal-8-javascript-snippets-0.0.2
tsega.drupal-8-twig-snippets-1.0.2
valeryanm.vscode-phpsab-0.0.16
xdebug.php-debug-1.34.0
Replying to my own comments:
git rebase -i main
) and removed the not-useful commit.feature/trello-458-use-ddev
branch of https://github.com/harvard-web-publishing/hwp-curie/pulls includes launch.json
. I also mention that in the wiki.FIXME
comment.@cemah-h:
You got it to work: great!
I added a troubleshooting section to the wiki page. That particular problem should not come up once https://github.com/harvard-web-publishing/hwp-curie/pull/662 is merged, but eventually there will be other repositories that also need the "magic file".
Resolves #1.