MikeSchulze / gdUnit4Net

A Godot C# Unit Test Framework.
MIT License
61 stars 5 forks source link

GD-115: Fix Debug tests gets stuck when using `--verbose` #119

Closed MikeSchulze closed 5 months ago

MikeSchulze commented 5 months ago

What

see https://github.com/MikeSchulze/gdUnit4Net/issues/115 The debugger was on hold because of printing system outs and the process has not start reading stdout and stderr

What

MikeSchulze commented 5 months ago

@van800 can you please check the debug works on rider? The version is not released yet, you need to check out the master and run the example project and edit the nuget.config inside the project to load the latest package versions.

van800 commented 5 months ago

@MikeSchulze I have tried that, I have double-checked to use locally compiled nugets. However, it doesn't work. I believe it is still a problem on our side.

Last runner error: TestRunner: JetBrains.ReSharper.TestRunner.Adapters.VsTest.Executor Could not attach debugger System.AggregateException: One or more errors occurred. (Specified method is not supported., reason: System.NotSupportedException: Specified method is not supported.
   at JetBrains.Rider.Backend.Features.UnitTesting.RiderUnitTestDebugHost.AttachToProcess(IUnitTestRun run, String remoteMachine, Int32 processId)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Hosting.DebugHostController.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestLaunch.HostControllerWithLogging.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestLaunch.HostControllerWithExtensions.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.DefaultTestRunnerHost.TestExecutionMessageHandler.Execute(AttachToProcessRequest message)
   at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.ServerEndpoint.<>c__DisplayClass7_1.<<TryRegisterAsyncHandler>b__0>d.MoveNext()
MikeSchulze commented 5 months ago

@MikeSchulze I have tried that, I have double-checked to use locally compiled nugets. However, it doesn't work. I believe it is still a problem on our side.

Last runner error: TestRunner: JetBrains.ReSharper.TestRunner.Adapters.VsTest.Executor Could not attach debugger System.AggregateException: One or more errors occurred. (Specified method is not supported., reason: System.NotSupportedException: Specified method is not supported.
   at JetBrains.Rider.Backend.Features.UnitTesting.RiderUnitTestDebugHost.AttachToProcess(IUnitTestRun run, String remoteMachine, Int32 processId)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Hosting.DebugHostController.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestLaunch.HostControllerWithLogging.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestLaunch.HostControllerWithExtensions.AttachToProcess(Int32 processId, IUnitTestRun run, ILogger logger)
   at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.DefaultTestRunnerHost.TestExecutionMessageHandler.Execute(AttachToProcessRequest message)
   at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.ServerEndpoint.<>c__DisplayClass7_1.<<TryRegisterAsyncHandler>b__0>d.MoveNext()

I know the issue of AttachDebuggerToProcess not implemented, that's a JetBrains problem. For me, it is from interesting that the workaround you proposed is working as before. Unfortunately, I can't test this myself because I don't have a Rider license.

van800 commented 5 months ago

Ah, I forgot that workaround. I will test tomorrow. I will see what I can do about the license. Makes total sense to provide one for you.

van800 commented 5 months ago

The workaround with while (!Debugger.IsAttached) still works as before.

MikeSchulze commented 5 months ago

The workaround with while (!Debugger.IsAttached) still works as before.

thanks for your feedback 👍

van800 commented 5 months ago

@MikeSchulze Regarding a Rider license, we'd be happy to provide one for you. I have wrote to your email stated in the github profile, from my jetbrains address.

MikeSchulze commented 5 months ago

@MikeSchulze Regarding a Rider license, we'd be happy to provide one for you. I have wrote to your email stated in the github profile, from my jetbrains address.

Thank you for this message, I have an answer and yes, I am very interested in the license ;)