Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved How do I debug a program?

Discussion in 'Project Tiny' started by hehehe520, Oct 31, 2020.

  1. hehehe520

    hehehe520

    Joined:
    Sep 25, 2020
    Posts:
    9
    Hi!I followed the documentation to generate and open the environment.But I can't always jump to the breakpoint I set.What should I do, please? 2.png
     
  2. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Hello @hehehe520,
    breakpoints inside bursted jobs will not be hit. Disable burst/add
    .WithoutBurst()
    to your
    Entities.ForEach
    and you should be able to hit the breakpoints.
     
  3. hehehe520

    hehehe520

    Joined:
    Sep 25, 2020
    Posts:
    9
    Thank you for your reply, but it still doesn't work
     
  4. hehehe520

    hehehe520

    Joined:
    Sep 25, 2020
    Posts:
    9
  5. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    916
    Are you sure you have an entity that matches the query?
    You can create an EntityQuery and check the number of entities it returns.
    Code (CSharp):
    1. protected override void OnUpdate()
    2. {
    3.     var query = GetEntityQuery(typeof(PhysicsVelocity), typeof(PhysicsMass), typeof(Jumper));
    4.     var noOfEntities = query.CalculateEntityCount();
    5. }
     
    Seaqqull likes this.
  6. hehehe520

    hehehe520

    Joined:
    Sep 25, 2020
    Posts:
    9
    Thank you very much for your reply. I found the way to debug with debug.log.
     
    Ted_Wikman likes this.