diff options
author | Jason Imison <nosami@users.noreply.github.com> | 2022-06-10 02:02:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 02:02:10 +0300 |
commit | 026e0554ef66792b4e838c8d930b53bbf1b73f53 (patch) | |
tree | f6837abd9ed1e21d3d7bd802c506484e73e2bb72 | |
parent | b34ca92ccaa1075d3e4424846654339b13b412d9 (diff) | |
parent | 3e45fef6c647f7fdc7d3f5c07b48b2e6e4056f87 (diff) |
Merge pull request #364 from mono/sourcelink
Add symbol server options and tweak cache path format
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs | 27 | ||||
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Client/SourceLink.cs | 6 |
2 files changed, 30 insertions, 3 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs b/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs index b125943..6353ba6 100644 --- a/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs +++ b/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs @@ -1,4 +1,4 @@ -// +// // DebuggerSessionOptions.cs // // Author: @@ -25,6 +25,8 @@ // THE SOFTWARE. using System; +using System.Collections.Generic; +using System.Collections.Immutable; namespace Mono.Debugging.Client { @@ -44,5 +46,28 @@ namespace Mono.Debugging.Client public bool ProjectAssembliesOnly { get; set; } public AutomaticSourceDownload AutomaticSourceLinkDownload { get; set; } public bool DebugSubprocesses { get; set; } + public ImmutableArray<SymbolSource> SymbolSearchPaths { get; set; } = ImmutableArray<SymbolSource>.Empty; + public bool SearchMicrosoftSymbolServer { get; set; } + public bool SearchNuGetSymbolServer { get; set; } + } + + [Serializable] + public class SymbolSource + { + public SymbolSource () + { + // For deserialization + } + + public SymbolSource (string path, string name, bool isEnabled) + { + Path = path; + Name = name; + IsEnabled = isEnabled; + } + + public string Name { get; set; } + public string Path { get; set; } + public bool IsEnabled { get; set; } } } diff --git a/Mono.Debugging/Mono.Debugging.Client/SourceLink.cs b/Mono.Debugging/Mono.Debugging.Client/SourceLink.cs index c904992..56cde15 100644 --- a/Mono.Debugging/Mono.Debugging.Client/SourceLink.cs +++ b/Mono.Debugging/Mono.Debugging.Client/SourceLink.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace Mono.Debugging.Client @@ -7,6 +7,7 @@ namespace Mono.Debugging.Client public class SourceLink { public string Uri { get; } + public string RelativeFilePath { get; } public SourceLink (string uri, string relativeFilePath) @@ -17,7 +18,8 @@ namespace Mono.Debugging.Client public string GetDownloadLocation (string cachePath) { - return Path.Combine (cachePath, new Uri (Uri).GetComponents (UriComponents.Path, UriFormat.SafeUnescaped)); + var uri = new Uri (Uri); + return Path.Combine (cachePath, uri.Host + uri.PathAndQuery); } } } |