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

Stack trace into the javascript console

Discussion in 'WebGL' started by fingersbleeding, Jul 1, 2015.

  1. fingersbleeding

    fingersbleeding

    Joined:
    Jun 10, 2013
    Posts:
    24
    Is there a way to get the stack trace for Debug.Log into the javascript console?
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    When you set exception support to "Full", WebGL should also emit code to track managed stack traces of everything (which is rather inefficient and should only be used for debugging). Other then that, the browser should collect the JavaScript stack trace (all managed & native code with mangled names) if you print an error (ie, Debug.LogError). Firefox and Chrome will then allow you to inspect the stack trace by opening a triangle next to the console log line.
     
  3. fingersbleeding

    fingersbleeding

    Joined:
    Jun 10, 2013
    Posts:
    24
    Makes a big file, but it provides the full stack. Thanks for the response.