neo-debugger
neo-debugger copied to clipboard
Make it easier for Mac users to find debugger logs
%LOCALAPPDATA% on Mac is ~/.local/share but a lot of people won't know that. Could mention in the settings UI where to typically find this location on various platforms.
Code for Environment.SpecialFolder.LocalApplicationData on non windows machines (more info]
case SpecialFolder.LocalApplicationData:
// "$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored."
// "If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used."
string? data = GetEnvironmentVariable("XDG_DATA_HOME");
if (string.IsNullOrEmpty(data) || data[0] != '/')
{
data = Path.Combine(home, ".local", "share");
}
return data;
NOTE as per Environment.SpecialFolderOption, the default behavior of GetFolderPath returns an empty string if the folder does not exist. So should also modify the underlying code to specify SpecialFolderOption.Create