A recompile is triggered in Visual Studio and this disconnects the debugger

(Please make the title of your topic brief but informative, and post error messages under the next heading Details and error message(s))

Description, details and error message(s)

Our code team usually stays attached to the debugger whilst coding and running the game and, whilst there can be a performance hit, this generally works fine. For some reason, these intermittent re-compiles change focus to the Visual Studio Output window (as if we’ve hit build or rebuild) and the debugger is detached from Unity. This can happen after hitting play mode, perhaps caused by a domain reload, which means we get detached without realising and then miss the break points we’re hoping to hit.

Expected behaviour

The code should not randomly recompile and if it does, it should not detach the debugger.

Screenshots

If applicable, add screenshots to help explain the problem.

How to reproduce

Rate: (Choose one, or describe it yourself)
Once / Sometimes / Every time

Steps:

  1. step
  2. step

Environment

SDK:
Unity:
OS/Platform:

Hey!

Do you perhaps have the “Bake on enter play mode” enabled in the coherence settings?
image

Other than that we’re not initiating recompilation automatically.

Hi Filip,

No I don’t have that setting enabled

Hi Filip, we’re still experiencing this issue. I’ve just spotted this error message in the output window in Visual Studio which may be relevant:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘The ThreadLocal object has been disposed.’.
at System.Threading.ThreadLocal1[T].GetValueSlow () [0x00014] in <1eb9db207454431c84a47bcd81e79c37>:0 at System.Threading.ThreadLocal1[T].get_Value () [0x0003e] in <1eb9db207454431c84a47bcd81e79c37>:0
at Coherence.Log.Targets.UnityConsoleTarget.Log (Coherence.Log.LogLevel level, System.String message, System.ValueTuple2[System.String,System.Object][] args, Coherence.Log.Logger logger) [0x00001] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\LogTargets\UnityConsoleTarget.cs:75 at Coherence.Log.Logger.LogToTargets (System.Collections.Generic.IEnumerable1[T] targets, Coherence.Log.LogLevel level, System.String log, System.ValueTuple2[System.String,System.Object][] args) [0x00036] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\Logger.cs:102 at Coherence.Log.Logger.BuildAndPrintLog (Coherence.Log.LogLevel level, System.String log, System.ValueTuple2[System.String,System.Object] args) [0x00001] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\Logger.cs:82
at Coherence.Log.Logger.LogImpl (Coherence.Log.LogLevel level, System.String log, System.ValueTuple2[System.String,System.Object][] args) [0x00078] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\Logger.cs:293 at Coherence.Log.Logger.Warning (Coherence.Log.Warning id, System.String msg, System.ValueTuple2[System.String,System.Object] args) [0x00010] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\Logger.cs:218
at Coherence.Log.UnityLogger.Warning (Coherence.Log.Warning id, System.String msg, System.ValueTuple`2[System.String,System.Object] args) [0x00010] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Log\UnityLogger.cs:110
at Coherence.Cloud.RequestFactory.Finalize () [0x00032] in .\Library\PackageCache\io.coherence.sdk@38b0585e01e1\Coherence.Runtime\Cloud\Requests\RequestFactory.cs:108