Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request Include the line of code where WaitForDomainReload was called into stack trace when it fails

Discussion in 'Editor & General Support' started by SolidAlloy, Jan 22, 2021.

  1. SolidAlloy

    SolidAlloy

    Joined:
    Oct 21, 2019
    Posts:
    58
    When WaitForDomainReload() fails, it shows a stack trace like this:

    System.Exception : Expected domain reload, but it did not occur
    ---
    at UnityEngine.TestTools.WaitForDomainReload+<Perform>d__7.MoveNext () [0x00048] in com.unity.test-framework@1.1.20\UnityEditor.TestRunner\TestRunner\Messages\WaitForDomainReload.cs:57
    at UnityEditor.TestTools.TestRunner.EditorEnumeratorTestWorkItem+<PerformWork>d__3.MoveNext () [0x002cb] in com.unity.test-framework@1.1.20\UnityEditor.TestRunner\TestRunner\EditorEnumeratorTestWorkItem.cs:144


    The problem is there may be multiple WaitForDomainReload inside a test, and it's hard to tell which one failed. Would be great if the stack trace led to the original line in code where WaitForDomainReload was called.