Search Unity

Bug? Breakpoints not being hit in Jobs

Discussion in 'Data Oriented Technology Stack' started by PublicEnumE, Dec 8, 2019.

  1. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    172
    I'm seeing cases in which breakpoints are never being hit, in Job code which is definitely running. I've run into multiple cases of this over the past week (still with Entities 0.1.1).

    Are there any known cases which could cause this? Have you seen the same?

    Thank you for any help. This is preventing us from tracking down some bugs.
     
    Last edited: Dec 8, 2019
  2. mkracik

    mkracik

    Joined:
    Aug 5, 2018
    Posts:
    14
    It happens to me when Burst compilation is enabled, when I disable Burst breakpoints are being hit.
     
  3. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    172
    Thank you! I am using Burst. Do you know if this is expected/intended behavior from the Burst team?
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,694
    Expected. Because bursted job compiled by JIT compiler at runtime and currently it's not your C# code anymore. If you want debug specific job, comment burst for this job.
     
    vestigial and PublicEnumE like this.
  5. mkracik

    mkracik

    Joined:
    Aug 5, 2018
    Posts:
    14
    With the new JobComponentSystem Entities.ForEach() breakpoints are not being hit for me inside the lambda (<>c__DisplayClass_OnUpdate_LambdaJob0.OriginalLambdaBody()) in Visual Studio 2017 even with Burst disabled in Unity Editor. Interestingly they are being hit in Rider 2019.2.3. Is it some limitation of Visual Studio?
     
  6. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    555
    I've found problems with break points inside jobs sometimes not being hit in Visual Studio under MacOs (of course with burst turned off).
    On Windows I had no problems.
     
unityunity