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

No break-on-exception??

Discussion in 'Editor & General Support' started by metachron, Nov 16, 2015.

  1. metachron

    metachron

    Joined:
    Oct 30, 2015
    Posts:
    3
    Hey folks,

    My dev group has selected unity to build a prototype, and after a couple months of futzing around with it, we have a working prototype. It seems to be a decent platform.

    However, we've noticed that there is essentially no way to break on exception and see the call stack. We tried the "experimental" feature in unityvs, and it doesn't seem to work at all. Being a non-game developer by trade, this is shocking to me that we can't expect that functionality--but at the same time, clearly, all of you using unity are able to get by without it.

    So, here's the question: How do you guys deal with this? Is this the norm for game development? All the developers having a higher proficiency would obviously help, but the ability to break on exception will expedite troubleshooting regardless. I realize this is a n00b question, but some insight would be appreciated. Thanks!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,814
    You need to attach the MonoDevelop debugger first. Take a look in the docs for help on how to do that. If the debugger is properly attached, the next exception will trigger an break and give you a full stack dump.

    If you debug the editor (the easiest), remember that when the editor is "breaked," you cannot use the editor at all: it is single-threaded.
     
    metachron likes this.
  3. metachron

    metachron

    Joined:
    Oct 30, 2015
    Posts:
    3
    Aha, that does work! Thank you. I thought VS was supposed to be the ide/debugger of choice (since it comes bundled with unity and all).
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,814
    This may indeed be the case but I think you would still need to attach to the process you want to debug, in this case the editor.

    Disclaimer: I've not used VS under Unity.
     
  5. metachron

    metachron

    Joined:
    Oct 30, 2015
    Posts:
    3
    Attaching from vs works fine--always has. You can even manually set break points and step through--just break on exception doesn't work (the feature is marked as experimental, and didn't work for me), which I thought was odd for a dev environment.