kitsune/.vscode
Tasos Katsoulas dcacc95627 Enable autoreload in vscode. 2021-05-17 13:04:09 +03:00
..
README.md add helper for debugging python scripts in vscode (#4638) 2021-01-07 13:44:20 +00:00
debug-python add helper for debugging python scripts in vscode (#4638) 2021-01-07 13:44:20 +00:00
launch.json Enable autoreload in vscode. 2021-05-17 13:04:09 +03:00
settings.json Update code settings. 2021-04-06 12:23:31 +03:00

README.md

Development in vscode (beta)

Install vscode and the Remote Development extension.

Launch vscode wherever you cloned this repo:

code .

In the vscode command palette (Ctrl+Shift+P) build and launch the container:

>Remote-Containers: Rebuild and Reopen in Container

Once vscode has reopened in the container, open a terminal (View > Terminal) and start browser-sync and the on-demand asset rebuilding:

npm run start-in-container

And run kitsune through the debugger:

>Debug: Start Debugging

Running without debugging

To run kitsune without debugging, ensure you start browser-sync and asset rebuilding as before with:

npm run start-in-container

And run kitsune with this vscode command instead:

>Run: Start Without Debugging

Stopping a stubborn kitsune instance

If you launch the "Kitsune" config in vscode, sometimes the server won't stop when you stop debugging.

In order to stop the server so you can start debugging again run the vscode command:

>Remote-Containers: Rebuild Container

Debugging a python script executed through the terminal (e.g. a django management command)

There's a helper script which will wrap any execution of a python script with vscode's debugger.

To use it, run:

.vscode/debug-python <script and arguments here>

e.g.

./vscode/debug-python ./manage.py help

The script's execution is paused until the debugger attaches to it. So to start it, open the run sidebar in vscode, select "Attach to .vscode/debug-python" from the dropdown, and click run.