Skip to content

Commit

Permalink
xamlil compatibility with debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Walmsley committed Apr 23, 2019
1 parent af244c3 commit ca20526
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
8 changes: 7 additions & 1 deletion AvalonStudio/AvalonStudio.Debugging/DebugManager2.cs
Expand Up @@ -12,6 +12,7 @@ namespace AvalonStudio.Debugging
using Mono.Debugging.Client;
using System;
using System.Composition;
using System.IO;
using System.Reactive.Linq;
using System.Xml;

Expand Down Expand Up @@ -309,7 +310,12 @@ private void _session_TargetStopped(object sender, TargetEventArgs e)

if (sourceLocation.FileName != null)
{
var normalizedPath = sourceLocation.FileName.NormalizePath();
string normalizedPath = sourceLocation.FileName;

if(Path.IsPathRooted(sourceLocation.FileName))
{
normalizedPath = sourceLocation.FileName.NormalizePath();
}

ISourceFile file = null;

Expand Down
33 changes: 27 additions & 6 deletions AvalonStudio/AvalonStudio.Languages.Xaml/AvaloniaPreviewer.cs
Expand Up @@ -330,16 +330,37 @@ private void OnMessage(IAvaloniaRemoteTransportConnection transport, object obj)
{
if (result.Error != null)
{
_errorText.Text = result.Error;
_showErrors.IsVisible = true;
if (_errorText != null)
{
_errorText.Text = result.Error;
}
if (_showErrors != null)
{
_showErrors.IsVisible = true;
}
_remote.InError = true;
if (_remote != null)
{
_remote.InError = true;
}
}
else
{
_remote.InError = false;
_showErrors.IsVisible = false;
_errorText.Text = "";
if (_remote != null)
{
_remote.InError = false;
}
if (_showErrors != null)
{
_showErrors.IsVisible = false;
}
if (_errorText != null)
{
_errorText.Text = "";
}
}
}
});
Expand Down

0 comments on commit ca20526

Please sign in to comment.