在哪里找到"Log Dyld API使用情况";和“日志库加载"在XCode 11上? [英] Where to find "Log Dyld API Usage" and "Log Library Loads" on XCode 11?

查看:75
本文介绍了在哪里找到"Log Dyld API使用情况";和“日志库加载"在XCode 11上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在XCode控制台中禁用Logging Dynamic loader事件(dyld)的打印.我在

解决方案

动态加载程序


  • 更新

    以上说明帮助OP查找确切的XML元素名称.一个必须删除:

    • LaunchAction/AdditionalOptions/AdditionalOption 元素
    • 其中 DYLD_PRINT_LIBRARIES 和/或 DYLD_PRINT_APIS

    I want to disable the printing of Logging Dynamic loader events (dyld) in the XCode console. I found a solution here. But I couldn't find Log Dyld API Usage and Log Library Loads options in product scheme diagnostics of XCode 11. Please help me find them.

    PS: If there is a new process in Xcode11 for disabling logs, please let me know.

    Answer: This step by step solution is suggested below in the answers. I am just attaching this picture for a better understanding.

    解决方案

    Dynamic loader

    One would say that you can set environment variables like DYLD_PRINT_APIS=0, DYLD_PRINT_APIS=false, DYLD_PRINT_APIS=no, ... but it doesn't work in this way. Check the source code:

    else if ( strcmp(key, "DYLD_PRINT_APIS") == 0 ) {
        gLogAPIs = true;
    }
    

    In other words gLogAPIs is true when the variable exists. You can set it to whatever value, keep it empty, it will be always enabled if the variable exists.

    Xcode scheme

    UI for this setting is gone in the Xcode 11, but it can still be in the scheme file. Let's say that you have a simple project Foo. The scheme is located at Foo/Foo.xcodeproj/xcshareddata/xcschemes/Foo.xcscheme1). It's a XML file. Quit Xcode and open this file in any editor and search for the LaunchAction element.

    There will be:

    • LaunchAction element attribute like enableAddressSanitizer = "YES"2) or
    • DYLD_... environment variable set.

    Just remove this attribute/environment variable and you should be fine.


    1) The exact path can vary, because it the scheme can be included in the workspace, project, ...

    2) I don't have a previous version (10) of Xcode installed, can't check for the exact name, but it should be there and it will be obvious which one it is. This one, I used, is for the Address Sanitizer checkbox. If you find the exact name, let me know and I will update this answer or answer it yourself and I'll delete this one.


    Update

    Instructions above helped OP to find exact XML element names. One has to remove:

    • LaunchAction/AdditionalOptions/AdditionalOption elements
    • where the key is either DYLD_PRINT_LIBRARIES and/or DYLD_PRINT_APIS

    这篇关于在哪里找到"Log Dyld API使用情况";和“日志库加载"在XCode 11上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆