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`.You can even configure your debug server to launch this request automatically.
There is a tutorial, in french, on the [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 on your dev environment.You can build only the modified part (for example, if you only modified client files: `npm run build:client`).Check the `package.json` files for available build scripts.
When the plugin is already installed on your dev instance, and you haven't changed any dependency, you can quickly install your work by following these steps: