Home:ALL Converter>Debugging C# Standard Class Library from a PowerShell Script in VSCode

Debugging C# Standard Class Library from a PowerShell Script in VSCode

Ask Time:2020-10-19T00:18:56         Author:Efie

Json Formatter

Looks like this may have been asked last year but wasn't answered.

I have been writing applications written in PowerShell using VSCode for development. I am starting to write some standard class libraries in C# and found out that I can also do C# development in VSCode using omnisharp.

What I am hoping that I will be able to do is the following:

  • Start debugging in my PowerShell script as I normally would

  • Move the debugger into my C# class so I can troubleshoot issues in my class library

Is this possible? I'm having trouble figuring out where to start. I'm guessing I'll need to do something to build the library in such a way it's able to be debugged and tie it to the PowerShell sessions somehow.

Any help or advice on how to get started would be greatly appreciated.

Author:Efie,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/64415565/debugging-c-sharp-standard-class-library-from-a-powershell-script-in-vscode
yy