In this javascript tutorial we look at how to debug an open source CLI application. For our demo we use Astro which is a static site generation tool and which has a CLI for adding integrations such as Tailwind. We start by forking the Astro repo in gihub and then clone to our PC. Once in place we can look as the readme.txt or contributing.md to see how the project is built and also how to launch it so that it is ready to be attached to from VSCode. Once we have this (in our case pnpm run dev) we can open the Javascript Debug console window and run the CLI js file using node as below:
node astro.js add tailwind
Any breakpoints that we have in the source code will now be hit and we can make fixes enhancements to the code and the create a PR if looking all good!
If you are looking for help with making your first open source contribution then hopefully this can be of assistance