PowerShell Module Project - How is it supposed to work?

We are considering moving our workflow from ISE to VS 2019 and PS7. I am currently trying things out using the demo license. We are mainly working on PS modules. When creating a module project in Visual Studio, how am I supposed to run or debug it? Just clicking the run button opens the psm-File in Notepad. In the project properties the entry point is set to something like project.tests.ps1, which obviously is supposed to be a template for unit tests with Pester.

However, I would rather prefer to run & test the code manually, meaning when running a module project I’d expect the module to be loaded and all the cmdlets being available in the PowerShell interactive window - and then Visual Studio to stop at any break points that might be in the code when calling them from the interactive window.

Can that somehow be achieved?

Hi @Aileron,

PSM1 files aren’t executable in PoshTools. You’ll need to create a PS1 file that imports the module and that executes the functions. There isn’t currently support for breaking in the debugger from the interactive window.