How to debug function in commandlet plugin?

I add my commandlet in plugin to call the main function in the plugin at runtime.
but I can’t debug it in vs.Please help me!
how to debug function in commandlet plugin?