vscode + perlnavigator + koha-testing-docker
July 27, 2023
To get this working, here’s what we’ll need
- vscode w/
- Microsoft’s Dev Containers extension
- bscan’s perlnavigator extension
- Optionally: Microsoft’s docker extension
- koha-testing-docker
- koha
Got koha-testing-docker already up and running? Great! If not, follow the docs.
Using the dev containers extension
It’s actually super straightforward.
The clicky way
- Open VSCode
- Open the dev containers tab
- Right click the
koha-koha-1container - Choose Attach in Current Window or Attach in New Window from the context menu
- Click on Open Folder
- Enter
/kohadevbox/koha
The right way ;)
- Open VSCode
- Hit the shortcut
Ctrl/Cmd + Shift + P - Type Dev Containers and choose the entry Dev Containers: Attach to Running Container…
- Choose the
koha-koha-1container - Hit
Ctrl/Cmd + Oand enter/kohadevbox/koha
There’s one more thing
The last thing you’ll need to do is to install the perlnavigator extension into the container. Just open the extensions tab and click Install in Container koha/ko..
You’re good to go
You can now configure perlnavigators settings to your liking and find all the definitions you want! Formatting and Linting is already working using the .perlcriticrc and .perltidyrc files in the project root.
Please tidy your code before submitting patches :D
PS: If you got the docker extension installed as well, you can get an overview of your running containers in the docker tab and just attach from there.
Cheerio