Merge pull request #7 from benaadams/sourcelink

SourceLink files
This commit is contained in:
Ben Adams 2017-11-11 19:01:03 +01:00 committed by GitHub
commit ba17506b3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View File

@ -9,7 +9,7 @@
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols> <IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource> <IncludeSource>true</IncludeSource>
<Version>0.0.1</Version> <Version>0.0.2</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -92,10 +92,23 @@ namespace System.Diagnostics
var filePath = frame.GetFileName(); var filePath = frame.GetFileName();
if (!string.IsNullOrEmpty(filePath)) if (!string.IsNullOrEmpty(filePath))
{
try
{ {
sb.Append(" in "); sb.Append(" in ");
var uri = new Uri(filePath);
if (uri.IsFile)
{
sb.Append(System.IO.Path.GetFullPath(filePath)); sb.Append(System.IO.Path.GetFullPath(filePath));
} }
else
{
sb.Append(uri);
}
}
catch
{ }
}
var lineNo = frame.GetFileLineNumber(); var lineNo = frame.GetFileLineNumber();
if (lineNo != 0) if (lineNo != 0)