Skip to content

Commit

Permalink
Initialize Natvis services once
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielle Chen committed Jan 31, 2023
1 parent e2e07cc commit 3cb7931
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/MIDebugEngine/Natvis.Impl/Natvis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ internal Natvis(DebuggedProcess process, bool showDisplayString, HostConfigurati
_configStore = configStore;
}

public void Initialize(string fileName)
public void InitializeNatvisServices()
{
try
{
Expand All @@ -271,7 +271,10 @@ public void Initialize(string fileName)
{
// failed to find the VS Service
}
}

public void Initialize(string fileName)
{
if (!string.IsNullOrEmpty(fileName))
{
if (!Path.IsPathRooted(fileName))
Expand Down Expand Up @@ -328,6 +331,7 @@ public void Initialize(List <string> fileNames)
{
if (fileNames != null && fileNames.Count > 0)
{
InitializeNatvisServices();
foreach (var file in fileNames)
{
Initialize(file);
Expand Down

0 comments on commit 3cb7931

Please sign in to comment.