Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

LINQ requests in Watch debugger

Discussion in 'Scripting' started by Candy_Smith, Nov 3, 2017.

  1. Candy_Smith

    Candy_Smith

    Joined:
    May 8, 2014
    Posts:
    102
    When i trying to use LINQ requests in Debug console (Immediate) or Watch
    I always get Expression not supported.

    However I tried the simple console c# project (no Unity) and it haven't this problem and any LINQ requests from Watch or Console works fine. It looks like problem related to Unity only.

    The issue detected on Mac in VS Code and Visual Studio for Mac, presumably it could also exists in Visual Studio on Windows and Mono.

    2017-10-31_08-38-20.png
     
  2. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Yeah. The workaround is to refactor whatever you are debugging so that the expression is a variable, because you can reference variables, just not define expressions.
     
  3. Candy_Smith

    Candy_Smith

    Joined:
    May 8, 2014
    Posts:
    102
    I just wish Unity will integrate this feature. Because modern systems already support it.