When debug mode isenabled, youcan restart Prosody using this API call: `http://your_instance.tld/plugins/livechat/router/api/restart_prosody`.This call don't need any authentificaiton.It can be done from a command line, for example using `curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody`.
For Prosody to connect to the debugger, call the API `http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.This call does not need any authentication.It can be done from a command line, for example with `curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`.Youcan even configure your debug server to launch this request automatically.
There is a tutorial, in french, onthe [Peertube forum](https://framacolibri.org/t/tutoriel-creer-un-environnement-de-developpement-de-plugin-peertube-rapidement-en-utilisant-docker-et-qui-permet-de-tester-la-federation/17631) that explains how to quickly build a dev env using Docker.
Note: for an unknown reason, Prosody can't resolve containers DNS address when using the lua-unbound library.There is a dirty hack in the plugin: just create a `/data/plugins/data/peertube-plugin-livechat/no_lua_unbound` file in your docker-volumes, then restart containers.
When you do modification, you don't have to always rebuild the full project, and reinstall the plugin onyour dev environment.Youcan build onlythe modified part (for example, if youonly modified client files: `npm run build:client`).Check the `package.json` files for available build scripts.
When the plugin is already installed onyour dev instance, and you haven't changed any dependency, youcan quickly install your work by following these steps: