Somehow we never got to it, but it would simplify the dev work a lot if we had a launch config for VSCode that you can use to debug CLI and tests.
I took a stab at it and the first setup is here: https://github.com/waldekmastykarz/cli-microsoft365/tree/vscode-debug-launch.
The idea is, that you can set a breakpoint anywhere in your code, press F5 and step through your code. For debugging a CLI command, you'll need to specify the command name in launch.json (see instructions in the file). For debugging tests you can launch the Debug Tests config.
What do you think @pnp/cli-for-microsoft-365-maintainers? Is this enough? Should we also automatically start the watch task, to autocompile changed files, or assume people will start it themselves if they don't have it running already?
Somehow we never got to it, but it would simplify the dev work a lot if we had a launch config for VSCode that you can use to debug CLI and tests.
I took a stab at it and the first setup is here: https://github.com/waldekmastykarz/cli-microsoft365/tree/vscode-debug-launch.
The idea is, that you can set a breakpoint anywhere in your code, press F5 and step through your code. For debugging a CLI command, you'll need to specify the command name in launch.json (see instructions in the file). For debugging tests you can launch the Debug Tests config.
What do you think @pnp/cli-for-microsoft-365-maintainers? Is this enough? Should we also automatically start the watch task, to autocompile changed files, or assume people will start it themselves if they don't have it running already?