Skip to content

Commit

Permalink
Merge pull request #799 from tdctaz/issue-662
Browse files Browse the repository at this point in the history
Fix issue with missing filenames and linenumbers in stacktraces
  • Loading branch information
ChrisMaddock authored Jul 23, 2020
2 parents 0d037ca + 6b42aa0 commit 50533b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void DefaultValues(string framework)
if (targetRuntime.Runtime == RuntimeType.Mono)
{
string monoOptions = "--runtime=v" + targetRuntime.ClrVersion.ToString(3);
monoOptions += " --debug";
Assert.That(startInfo.FileName, Is.EqualTo(RuntimeFramework.MonoExePath));
Assert.That(startInfo.Arguments, Is.EqualTo(
$"{monoOptions} \"{process.AgentExePath}\" {process.AgentArgs}"));
Expand Down
4 changes: 1 addition & 3 deletions src/NUnitEngine/nunit.engine/Services/AgentProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Diagnostics;
using System.IO;
using System.Text;
using NUnit.Engine;
using NUnit.Engine.Internal;

namespace NUnit.Engine.Services
Expand All @@ -25,7 +24,6 @@ public AgentProcess(TestAgency agency, TestPackage package, Guid agentId)

// Access other package settings
bool runAsX86 = package.GetSetting(EnginePackageSettings.RunAsX86, false);
bool debugTests = package.GetSetting(EnginePackageSettings.DebugTests, false);
bool debugAgent = package.GetSetting(EnginePackageSettings.DebugAgent, false);
string traceLevel = package.GetSetting(EnginePackageSettings.InternalTraceLevel, "Off");
bool loadUserProfile = package.GetSetting(EnginePackageSettings.LoadUserProfile, false);
Expand Down Expand Up @@ -55,7 +53,7 @@ public AgentProcess(TestAgency agency, TestPackage package, Guid agentId)
{
StartInfo.FileName = RuntimeFramework.MonoExePath;
string monoOptions = "--runtime=v" + TargetRuntime.ClrVersion.ToString(3);
if (debugTests || debugAgent) monoOptions += " --debug";
monoOptions += " --debug";
StartInfo.Arguments = string.Format("{0} \"{1}\" {2}", monoOptions, AgentExePath, AgentArgs);
}
else if (TargetRuntime.Runtime == RuntimeType.Net)
Expand Down

0 comments on commit 50533b0

Please sign in to comment.