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 are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

How can I remove development console window in built game.

Discussion in 'Editor & General Support' started by Tezelian, Feb 18, 2014.

  1. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    I get a couple of null reference errors which I want to ignore because I can't solve it for now but after I build the game successfully and I enter my trigger I get a box on the left give me the null reference errors during the game like in the editor which I don't want.

    So how can i just get rid of this window?

    Here's a print screen

    $dc.png

    and if I can't here is the problem, whenever I change to camera2 it gives me these null reference errors.

    http://forum.unity3d.com/threads/22...everal-errors-when-changing-camera-on-trigger
     
    sdavari likes this.
  2. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    Remove checkbox in Build Settings "Development Build".
     
    zammle2009wtf and sdavari like this.
  3. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    Thank you very much sir, you saved my day ;)
     
  4. mbsonb

    mbsonb

    Joined:
    Oct 24, 2012
    Posts:
    3
    I have unchecked this box, but the console remains. I am targeting WP8.
     
  5. iFischer_d

    iFischer_d

    Joined:
    Feb 16, 2015
    Posts:
    1
    I would like to know this as well. When attempting to profile targeting windows phones, it seems the OnGUI including the "Developer Console" is taking up quite some time. If any one knows a way to profile but turn this feature off, please let us know.

    Thank you
     
  6. Hoc

    Hoc

    Joined:
    Apr 11, 2015
    Posts:
    1
    I see that console in the CityOfSteam game.
    How to make it disappear? I just a gamer and dont that thing
    Thank you in advance
     
  7. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    I have the same problem i did the One level doom remake with unity 4 trial version a few months ago and forgot to remove the checkbox for the console in the build settings and now the console is popping up all the time and there is no possibility to turn it off during play. :-((((

    I have no possibility to make a new build, cause it was the trial version and now with unity 5 the game won't work without major changes anymore. Is there a way to turn it off, during the gameplay? I can't cklick on the buttons cause leftclicks are handeld as going for First Person mode and right click is used for aming, so with Esc the cursor appears but it's not possible to click on console close. Please help!!
     
    Last edited: Jul 2, 2015
  8. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,268
    You did publish a game with the trail version of unity 4 ?
    Thats not legal.
    http://forum.unity3d.com/threads/publishing-a-free-game-with-30-day-pro-trial.176055/
    If you like to publish your unity 4 version game you have to use the free version of buy the pro if you need the pro features.
    And not there is no option to disable the development console in the build other then building without the development build flag.
     
  9. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Thank you for you answer.
    i didn't "publish" a game, it's just a demo free to play for everyone, i don't get money out of it. :confused:
    And now with unity 5 it's completely outdated anyway.
     
  10. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,268
    To quote the linked thread:

    If you make money from it or not does not matter. You can not distribute / publish any trail build.
    If you do not need the 5.x features and you have a 4.x project it's still valid to work in the 4.x version of unity
     
  11. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Ok thank you you made my day, i will remove it.
     
  12. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    I totally agree, that there should be an option in any development build to turn off the console permanently for this running session.

    Development build has a heck lot of advantages other than this console and turning dev-build off just because it fills the screen if we got one looping exception is not good practice.

    I think that the tester should be able to turn off any kind of logging, including logging to the Editor console and logging to the editor.log file. Because S*** happens in "Development builds" and sometimes, the whole build is unusable if the code tries to log an exception or log message 100 times per frame.
     
    UnLogick likes this.
  13. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    878
    The "Clear" button will clear the current screen of log messages.

    The "Close" button will close the window and not show it again for that session.
     
  14. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    Really? That's good to hear. :) Last time I checked, "Close" only closed the console until another error happens.
     
  15. bsawyer

    bsawyer

    Joined:
    May 6, 2014
    Posts:
    37
    The "Close" button does NOT prevent the window from re-appearing. At least in Unity 5.3.1, if a new error is logged, the console window reappears.
     
    UnLogick likes this.
  16. Dee_Lucky

    Dee_Lucky

    Joined:
    Jun 26, 2015
    Posts:
    53
    I have the same issue, anybody found a way to remove the console for good?
     
    UnLogick likes this.
  17. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,179
    For development console to dissappear:
    * For Windows Standalone simply uncheck Development Player
    * For Windows Phone, select Master config in Visual Studio
     
  18. Immanuel-Scholz

    Immanuel-Scholz

    Joined:
    Jun 8, 2013
    Posts:
    221
    Yea, seems that unfortunately, the only way for unity to disable the annoying console is to turn off all development features (and hence, do a full rebuild - about 1 hour for us). I was hoping for more flexibility, but well... you have to work with what you got..
     
  19. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    219
    There needs to be some way of exposing some method for disabling this console in dev builds. I have (and I assume many others do as well) a custom in-game console which suits my specific needs and is tightly controllable. I don't need nor want to have the unity developer console displayed. The Unity reply here, while technically true, is kind of a bizarre answer.
     
    UnLogick likes this.
  20. YTNN Gamer

    YTNN Gamer

    Joined:
    May 7, 2016
    Posts:
    1
    Hi where is the Checkbox to deaktivate the development console?
     
    UnLogick likes this.
  21. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    I concur. There is considerable value (for us) in being able to run a development build without having the console present at all. The primary use case is to obtain log files containing line numbers, without spamming a console that can fill up much of the screen thereby covering important UI.

    Our (late development stage) test sessions often run beyond an hour, and the current implementation is frustrating. Further, some bugs only occur in standalone and not in the Unity Editor.

    We also provide players with the ability to email in their log files via the game UI, but they are far less valuable than if they contained line numbers. Being able to publish playable development builds to an experimental branch would be highly beneficial.

    We're still on 5.2.2p2 so apologies if this has already been implemented since May 7th (post above us) and we're not aware of it.

    +1 for a build option to completely disable the console in development builds.
     
    Last edited: Oct 30, 2016
  22. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    878
    dimmduh1, UnLogick, ceitel and 3 others like this.
  23. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    I'll give that a try later today, thanks.
     
  24. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    793
    It would be great to have an option to turn off Dev console but keep a dev build.
     
    Chrispins and UnLogick like this.
  25. GainfulSage

    GainfulSage

    Joined:
    Apr 30, 2015
    Posts:
    94
    Yeah... I want to have debug symbols for crash reporting turned on, but I don't need the console window popping up all of the time. :p
     
    UnLogick, hugeandy and JoeStrout like this.
  26. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,770
    I've just stumbled upon this completely undocumented feature today (causing some embarrassment). Is there still no better solution than to set Debug.developerConsoleVisible = false every Update?
     
    UnLogick and ceitel like this.
  27. davidrochin

    davidrochin

    Joined:
    Dec 17, 2015
    Posts:
    65
    Not even that works for me now that I am on 2019.4
     
    ceitel likes this.
  28. M01i4

    M01i4

    Joined:
    Sep 1, 2020
    Posts:
    2
    Anyone who has been able to solve this with Unity 2019.4?
     
    ceitel likes this.
  29. ceitel

    ceitel

    Joined:
    Jan 3, 2017
    Posts:
    32
    Has anyone found a solution in 2019.4?
     
  30. ceitel

    ceitel

    Joined:
    Jan 3, 2017
    Posts:
    32
    Is this a known bug in 2019.4 that you cannot disable the dev console in a UWP build? I have a UWP VR build and the dev console is appearing in portion of the right lens of the WMR headset, even with "development build" unchecked
     
  31. ceitel

    ceitel

    Joined:
    Jan 3, 2017
    Posts:
    32
  32. hugeandy

    hugeandy

    Joined:
    Nov 2, 2016
    Posts:
    102
    I can't believe this thread goes back so old and there is still no solution to this!

    There needs to be a way to disable the development console whilst still in a development build... either:
    1. Pick at build time to disable the in-game development console
    2. Change the behaviour of the "Close" button on the console to actually keep it closed until the next run of the game, rather than it popping right on open again the next time an error is logged!

    Lots of us need the other features of a development build without having the spammy console getting in the total way! The official advise to disable it being "simply uncheck Development Player" is kinda a massive joke
     
  33. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Please review your stance on this issue. Development mode is the ONLY way to get line numbers in callstacks! Granted I'd prefer to have them in real production builds, but other threads makes it clear that with all the native platforms, web builds, IL2CPP and other strange stuff going on this is a massive task.

    This is 2021 using error tracking solutions are mainstream and having line numbers in those is just common sense.

    I made a thread here about my attempts to bypass this feature, conclusion? We need Unity to step up.
    https://forum.unity.com/threads/how-to-get-line-numbers-in-production-build.1068116

    I managed to convince the rest of the team that we'll take the Development Mode watermark and the hazle of closing the development console whenever an error is logged. (As already mentioned above it can be closed with https://docs.unity3d.com/ScriptReference/Debug-developerConsoleVisible.html) but this solution is subpar and required us to redesign some of our UI to avoid the watermark. And it makes our product seem less professional in order to be more professional.
     
  34. deeprest

    deeprest

    Joined:
    Jun 8, 2016
    Posts:
    14
    Unity, please fix this for 2019.4.18f1
    Easy ways to fix this long standing usability bug:
    • A build settings checkbox, separate from the Development Build option
    • A bool in Debug namespace to set the hide/show state of the dev console
    It does not seem like a big ask, but it does seem like basic functionality we should already have. Please implement this.

    With the option to disable automatic logging to the Unity dev console, we could use Application.logMessageReceived to intercept unity messages and log to a custom dev console.
     
    Mayhem-McAwesome likes this.
  35. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    8,727
    Bug? You should explain this a little bit.

    The purpose of the development build is to check and make it easy to find bugs in your game. That's what it's for.
    And showing fatal errors and exceptions on screen (and only those, not logs) is doing just that.
     
    Last edited: Apr 21, 2021
  36. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I don't mind your (and Unity's) definition of development build, if not for the fact that it is impossible to get line numbers from production builds.

    Since switching our production! to development builds and getting line numbers I can now consistently fix 10+ repeating error call stacks in a single (6 hour) day.

    Without line numbers I'd be happy to manage two, having to second guess every line of code in a method is exhausting, wasteful and error prone, you end up adding safeguards for code that is perfectly fine because you simply can't guess exactly what blows up in a null ref. Even better it allows you to reliably and without fault group errors when it's the same variable that ended up being null and then accessed from multiple locations.

    At this point in time, I only have one of these annoying cases left, where I had to add more context to the error tracker to pin point exactly how the code reach the bad state to begin with. Mind that is still 20 or so unique but rare call stacks, that I can now pin as a single issue instead of hunting all twenty in the blinds.
     
  37. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    8,727
    When I see the box I'm like: "Oh, shoot, let's see the logs". :) Yeah, I know, it's not the best tool on the market, but it does let you know to look out because something is up.
     
  38. deeprest

    deeprest

    Joined:
    Jun 8, 2016
    Posts:
    14
    I call an irremovable legacy feature that no longer functions correctly and annoys me often a "bug". Or at least it should be considered one. It seems like a minor thing, but I've been looking at the thing for a decade, which is long enough. All I'm asking for is an option to disable the development console and still debug my build. It can be a problem for playtesters. If it's not a problem for you, then maybe you don't find this thread relevant.

    The development console no longer responds to clicks, and the buttons do not work. My guess is because the new input system's UI Input Module has replaced the old Standalone Input Module which worked with IMGUI. Even if it worked correctly, at this point I would not use it, but I would like to remove it. To see errors I can keep the Player log open, use exception breakpoints, and selectively forward exceptions/logs to my own console using this:
    Code (CSharp):
    1.  
    2. Application.logMessageReceived += delegate( string condition, string stackTrace, LogType type )
    3.     {
    4.       switch( type )
    5.       {
    6.         case LogType.Error:
    7.           devConsole.LogError( condition + stackTrace );
    8.           break;
    9.         case LogType.Exception:
    10.           devConsole.LogError( condition + stackTrace );
    11.           break;
    12.         case LogType.Assert:
    13.           devConsole.LogError( condition + stackTrace );
    14.           break;
    15.         case LogType.Warning:
    16.           devConsole.LogWarning( condition + stackTrace );
    17.           break;
    18.         case LogType.Log:
    19.           devConsole.Log( condition );
    20.           break;
    21.       }
    22.     };
     
    UnLogick likes this.
  39. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,268
    Somehow does the the unity Cloud Diagnostics service enables proper line number if you upload the symbols that unity can generated on build. (i only tested this on windows so far and not a debug build)
     
    UnLogick likes this.
  40. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Wow, talk about screwing your competition. I tried getting the line numbers by invoking the .net pdb resolving code directly (The stuff inside the StackTrace class) but they've modified the underlying native call so that didn't work either. So they've blocked all reasonable attempts to secure the line numbers runtime and then they use server side symbol resolving to bypass it. Wow...

    Please to defend their honor please check that it at least fails on il2cpp. They've quoted technical problems resolving the line numbers on il2cpp and certain native platforms, I hope that wasn't a smoke screen.

    The plus/pro deal is actually quite good I'd prefer more than 90 days retention but other than that it's actually better than what we're paying $4 a month for, but the free version... 10 user generated events and 25 Crash & Exception reports a day? 7 days retention? Without custom meta data... That's past utter rubbish, that's a slap in your face. You can't possible get enough to data to solve a problem that doesn't have 100% repro.
     
  41. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    9,714
    We didn't "block" anything. We just don't copy .pdb files into the game directory if you build a non-development build. If you take your "Managed" folder from a development build, copy it over the non-development build one, the line numbers will "magically" appear in your non-development build. It's a bit more complicated with IL2CPP, but you can do it offline too as we copy the native PDB files to "_BackupThisDirectoryButDontShipItWithYourGame" folder. You can use the PDB files to resolve the native .cpp file (which also gets copied to that folder) line number from the native stack frames. Then, since generated .cpp files contain the original C# code as comments, you can match it with the original C# source code.

    You can call it bad design, but there's nothing nefarious about it. Most people don't want to ship their source code information in their game (which is needed to resolve line numbers at runtime) and that's why it has historically worked this way.
     
  42. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That is incorrect, I already tried that!

    Please read my attempts here:
    https://forum.unity.com/threads/how-to-get-line-numbers-in-production-build.1068116/

    I used ILSpy all the way down to native, it's completely locked down.


    EDIT: The hack proposed by @Tautvydas-Zilys actually works in Unity 2020.2 (tested by him) and 2020.3 (tested by me). It's just the entire Unity 2019 series (including LTS) and earlier that's screwed. I guess I'll be updating our project to get rid of the development watermark.
     
    Last edited: Apr 27, 2021
  43. RambosRide

    RambosRide

    Joined:
    Nov 8, 2020
    Posts:
    18
    I'm getting this development console popping up from a unity command line build (2020.3.25f1). The project has Development Build unchecked, but I am generating a Visual Studio Solution so that I can alter the C++ files to update build version etc and run a release build. I have verified its to the bin/release folder.
     
  44. RambosRide

    RambosRide

    Joined:
    Nov 8, 2020
    Posts:
    18
    Found the Fix...but this has to be a bug... Adding to:
    Tomas1856
    For development console to dissappear:
    * For Windows Standalone simply uncheck Development Player
    * For Windows Phone, select Master config in Visual Studio

    The key for me was to build Windows Standalone -> VS to Master not Release and the console goes away..Release should not show the console imo.
     
    Last edited: Apr 21, 2022
  45. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    9,714
    This is mostly historical, but this is what the configurations mean:

    Debug -> C++ code is built in debug configuration without any optimizations, uses development version of the engine
    Release -> C++ code is built in release configuration with most optimizations, still uses development version of the engine
    Master -> C++ code is built in release configuration with most optimizations, uses non-development version of the engine
    MasterWithLTCG (only available with IL2CPP) -> C++ code is built in release configuration with maximum optimizations, uses non-development version of the engine
     
unityunity