Skip to content

Instantly share code, notes, and snippets.

View thgossler's full-sized avatar

Thomas Gossler thgossler

View GitHub Profile
@thgossler
thgossler / CommandLine.cs
Last active December 21, 2022 02:42
Workaround for not supported commandLineArgs for WSL launch profile with Visual Studio remote debugging
// Slightly modified version of the code posted in https://stackoverflow.com/a/64236441/7422811
// License: Attribution-ShareAlike 2.5 Generic (CC BY-SA 2.5), https://creativecommons.org/licenses/by-sa/2.5/
using System.Text;
/// <summary>
/// Helper functions to parse a command line string into a command line argument array in
/// the same way as .NET does. Tested with .NET 6 on Windows and Ubuntu Linux.
/// </summary>
internal static class CommandLine