For Debug purposes only If we want to debug the C# code, we to build the project in Visual Studio Open Powershell ISE and Load the Module using the Command Import-Module \PowershellBGInfo.dll Then in Visual Studio go the Debug menu and select "Attach to Process" Select the Powershell_ISE.exe process and click Attach Then you can set breakpoints in the C# code and debug it Run the function from Powershell ISE Be advice that if you import the module in Powershell ISE, you need to close ISE for Build the Module (because the module is locked by ISE)