Announcement

Collapse
No announcement yet.

How to add "bUseLoggingInShipping" to my Project?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to add "bUseLoggingInShipping" to my Project?

    Hello UE Users
    Iam competly new to C++, i only work with blueprints but my game crashes after i packaged it and in the editor its working perfectly...
    I generated all project files and have now some .cs files in my Project Folder, but in which file i have to add this code?:

    UEBuildConfiguration.bUseLoggingInShipping = true;

    I need it to find the problem why my game crashed, i hope someone can tell me the filename to insert this code
    Thank you !

    #2
    Hi Sky001, to use that build option, you must first have a source build of the engine on your PC. It will not work at all without it. Get it, compile it in Development Editor mode (with all the utility programs) before continuing.

    Once you have done that, you put that line of code, plus some other options, into the yourproject.Target.cs file in the source folder of your project. This is what mine looks like:

    YourProject.Target.cs
    Code:
    // Fill out your copyright notice in the Description page of Project Settings.
    
    using UnrealBuildTool;
    using System.Collections.Generic;
    
    public class YourProjectTarget : TargetRules
    {
        public YourProjectTarget(TargetInfo Target): base(Target)
        {
            Type = TargetType.Game;
    
            //Use these config options in shipping to enable logs, and to enable debugger.
            if (Configuration == UnrealTargetConfiguration.Shipping)
            {
                BuildEnvironment = TargetBuildEnvironment.Unique;
                bUseChecksInShipping = true;
                bUseLoggingInShipping = true;
            }
    
            ExtraModuleNames.AddRange(new string[] { "YourProject" });
        }
    
    }
    Then, next time you package it in Shipping mode, not only will you get the logs, but you will be able to attach a visual studio debugger to the shipping binary as well. Hope this helps.

    Comment


      #3
      Originally posted by Gossy View Post
      Hi Sky001, to use that build option, you must first have a source build of the engine on your PC. It will not work at all without it. Get it, compile it in Development Editor mode (with all the utility programs) before continuing.

      Once you have done that, you put that line of code, plus some other options, into the yourproject.Target.cs file in the source folder of your project. This is what mine looks like:

      YourProject.Target.cs
      Code:
      // Fill out your copyright notice in the Description page of Project Settings.
      
      using UnrealBuildTool;
      using System.Collections.Generic;
      
      public class YourProjectTarget : TargetRules
      {
      public YourProjectTarget(TargetInfo Target): base(Target)
      {
      Type = TargetType.Game;
      
      //Use these config options in shipping to enable logs, and to enable debugger.
      if (Configuration == UnrealTargetConfiguration.Shipping)
      {
      BuildEnvironment = TargetBuildEnvironment.Unique;
      bUseChecksInShipping = true;
      bUseLoggingInShipping = true;
      }
      
      ExtraModuleNames.AddRange(new string[] { "YourProject" });
      }
      
      }
      Then, next time you package it in Shipping mode, not only will you get the logs, but you will be able to attach a visual studio debugger to the shipping binary as well. Hope this helps.
      Thank you ! this helps!

      Comment

      Working...
      X