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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Debugging with async and await

Discussion in 'Experimental Scripting Previews' started by makeshiftwings, Sep 12, 2017.

  1. deastonAOD

    deastonAOD

    Joined:
    Nov 14, 2017
    Posts:
    2
    That worked perfectly, thank you.
     
  2. matthew798

    matthew798

    Joined:
    Feb 4, 2014
    Posts:
    5
    I can't express how happy I am to have found this thread. I have been questioning everything I know about async programming, wondering how I just can't seem to get anything working...
     
  3. MorCompediaNet

    MorCompediaNet

    Joined:
    Jan 22, 2017
    Posts:
    21
    So, wondering about this now that 2018.3 beta is out.
    Is single stepping now available in the new beta?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yes, it should be working now.
     
  5. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    There was one additional fix to not compile C# with optimizations to ensure local variables are visible. This was just recently fixed and may not be in current beta.
     
  6. MorCompediaNet

    MorCompediaNet

    Joined:
    Jan 22, 2017
    Posts:
    21
    That's great, thanks a lot guys!
     
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yes, I'll see what I can do, thanks!
     
    af_bozturk and Thaina like this.
  9. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    Thank you very much
     
  10. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    @JoshPeterson Hello are there any update about vscode problem?
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Sorry, I don't have an update about this. If you have not done so, can you open an issue on the Github repo for this problem?
     
  12. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
  13. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    digging
     
  14. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    @JoshPeterson Hello, are there any progress to fix vscode?

    Could you please guide me what debugger library that VSTU was used?
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I'm unsure about the status of these issues. I think the Github repo is the best place to track their progress.
     
  16. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    @JoshPeterson That repo was not have any update for such times. So I would like to ask you just that, are there VSTU repo that I could see the code being used on unity debugger that official Visual Studio was using now? I might try to make it as new vscode extension
     
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Sorry, maybe I missed what your original question was about. I think that VSTU and Visual Studio support async/await debugging properly. Are you asking if this is the case?
     
  18. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,158
    Yes, I know VSTU and Visual Studio support async/await debugging properly. So I want to know what library and how it was coded, so I would have a way to copied it to make new debugger for vscode. Because I prefer vscode than visual studio
     
  19. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    You may want to have a look at https://github.com/mono/debugger-libs. It seems this code may have an async/await implementation.
     
    Thaina likes this.
  20. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201

    Visual Studio 2019 v 16.4.3
    VSTU v 4.4.2.0
    Unity v 2018.4.9f1

    When stepping over an await statement of a method that returns
    Task<T>
    , unity crashes consistently. Is there a solution for that? i read the thread and it seems like it should be working, but it is not.