ReSharper 2025.3 Help

Code inspection: Debug logging functions only accept strings

This inspection reports calls to Debug.Log, Debug.LogWarning, or Debug.LogError in code compiled by the Burst compiler when the logged value is not a string.

Burst debug logging only accepts regular strings and supported fixed strings. Logging numbers, structs, or other non-string values directly will trigger this inspection because it would involve implicit conversion or boxing to a managed object.

Example

In this example, an integer is passed directly to Debug.Log. This is not supported in Burst-compiled code.

using Unity.Burst; using Unity.Jobs; using UnityEngine; [BurstCompile] public struct ExampleJob : IJob { public void Execute() { // Reported: Debug.Log argument must be a string or fixed string Debug.Log(42); } }
using Unity.Burst; using Unity.Collections; using Unity.Jobs; using UnityEngine; [BurstCompile] public struct ExampleJob : IJob { public void Execute() { // Pass a string or a Burst-compatible fixed string FixedString128Bytes message = "Value: 42"; Debug.Log(message); } }

Quick-fix

This inspection does not provide a dedicated quick-fix. Fix it manually by changing the logged argument to a string or a fixed string.

26 March 2026