gpt4 book ai didi

Xcode内部调试日志

转载 作者:行者123 更新时间:2023-12-04 04:54:54 28 4
gpt4 key购买 nike

我正在对Xcode进行逆向工程,我想知道是否有一种启用调试日志的方法。我想Xcode可能对此有一些隐藏的偏好,对吗?

最佳答案

是的,您可以在Xcode中启用许多隐藏的日志。这是您可以调整日志级别的所有方面的列表。通过以下方式获取此列表

(lldb) po [[[DVTLogAspect allAspects] valueForKey:@"name"] sortedArrayUsingSelector:@selector(compare:)]

AutomaticTermination
AuxiliaryFilesWriting
BlockQueue
Build
BuildConfigurations
BuildContext
BuildInfo
BuildMessages
BuildPlanCreation
BuildRuleLoading
BuildSettingExpansion
BuildSettings
BuildTaskCreation
Building
Cache
CachePruning
Caching
Capabilities
ClangCodeCompletion
CodeSign
CodeSignUI
CommandInvocation
CommandLineBuildTiming
ConfigInspectionContext
Container
DBGDebugSessionPerformance
DBGFormattedSummaryPerformance
DBGNonPrimaryPCPerformance
DBGStackFrameFetchPerformance
DBGSteppingPerformance
DBGVariablesViewPerformance
DBGViewDebugger
DBGXPCDebugging
DSMDocSetLoading
DSMDocSetSearch
DVTActivityOptions
DVTAnnotationManager
DVTArchitecture
DVTAssertionEnvironment
DVTAssertions
DVTBindingHelper
DVTCodesigningAllTheThings
DVTCollectionChecking
DVTCommandLineTool
DVTDevice
DVTDeviceSearch
DVTDownloadable
DVTFilePath
DVTFilePathFSEvents
DVTFilePathLogMetrics
DVTFileType
DVTFindBar
DVTFirstLaunchPackageInstallationHelper
DVTFontAndColorTheme
DVTInvalidExtension
DVTMacroExpansionParsing
DVTMacroNamepsace
DVTMixIn
DVTNSImageAdditions
DVTNSImage_ImageDeallocations
DVTNSRunLoopAdditions
DVTPlatform
DVTPlugInExtensionFaulting
DVTPlugInLoading
DVTPlugInLocator
DVTPlugInManager
DVTPlugInQuery
DVTPreferenceSetManager
DVTRegularExpression
DVTReplacementView
DVTSDK
DVTSigningCertificate
DVTSigningCertificateManager
DVTSigningCertificateSource
DVTSourceEditorDrawing
DVTSourceEditorFolding
DVTSourceEditorLayout
DVTSourceEditorPerformance
DVTSourceLandmarks
DVTSourceModel
DVTSourceScanner
DVTSourceSpecificationLoading
DVTStateSaving
DVTSystemActivity
DVTTextAnnotation
DVTTextCompletionPerformance
DVTTextCompletionUI
DVTTextResponsivenessPerformance
DVTToolchain
DepCommandTraversal
DepNodeTraversal
Dependencies
DependencyAnalysis
DependencyGraph
DependencyGraphCreation
DependencyGraphCreationMetric
DependencyGraphLock
DependencyIssue
DerivedInfo
DerivedTargetAttributes
DocumentFileTypes
Executable
FSWatcher
FileInfoCaching
FileRefCaching
FileSuffixMapping
FileTypeDetection
GenericOutputParsing
GroupEnumerator
HdrScanning
HeaderScanning
Headermap
HeadermapCreation
Headermaps
IBAutoAttach
IBICPerformanceMetric
IBMessageChannel
IDEActivityLogSection
IDEActivityReportFileIOCoordinator
IDEActivityView
IDEActivityViewIssues
IDEActivityViewStructure
IDEApplicationLaunchPerformance
IDEBatchFindMetric
IDEBatchFindNavigator
IDEBuildAlertMonitor
IDEBuildArbitratorDebug
IDEBuildDebugMetric
IDEBuildIssueProviderLogLoadingPerformance
IDEBuildOnlyMetric
IDEBuildOperationDebug
IDEBuildOperationDependencies
IDEBuildOperationMemorySnapshot
IDEBuildOperationQueueSetResourceManagement
IDEBuildOperationTiming
IDEBuildTaskDebug
IDEBuilderDebug
IDECallHierarchy
IDECallerGenius
IDEClangDiagnostic
IDECodeModule
IDECommandManagerPerformance
IDEContainerDebug
IDEContainerFSEventsDebug
IDEContainerItemSCMDebug
IDEContextAutocreation
IDECounterpartsGeniusResultsFinderPerformance
IDEDeclarativeInspectorGeneratorLoadingPerformanceAspect
IDEDiagnosticController
IDEEditorContextDocumentForNavBarStructureChanged
IDEEditorContextFluidSwipeDebug
IDEEditorContextNavigation
IDEEditorContextObjectGraphCoalescing
IDEEditorCoordinator
IDEEditorDocument
IDEEditorDocumentDebug
IDEEditorDocumentModificationAspect
IDEEditorOpenPerformance
IDEExecutionEnvironmentExecuteOperation
IDEFileReferenceDebug
IDEFileReference_CallingDocumentEditedStateChangedTooOften
IDEFolderDebug
IDEGeniusResults
IDEGeniusResultsPerformance
IDEImplicitDependenciesDebug
IDEIndexDataSourcePerformanceAspect
IDEIndexDatabase
IDEIndexImporterDebug
IDEIndexQP
IDEIndexQuery
IDEIndexSwiftDataSource
IDEIndexing
IDEIndexingASTSize
IDEIndexingClangInvocation
IDEIndexingMetrics
IDEIndexingScheduling
IDEInitialization
IDEIssueManager
IDEKVO
IDEKeyBindings
IDELicenseAgreementViewController
IDELogStore
IDENavigableItem
IDENavigableItemArchivableRepresentation
IDENavigableItemCoordinator
IDENavigatorOutlineViewPerformance
IDENotifications
IDEOpenQuickly
IDEOpenQuicklyMetrics
IDEPackageInstallerHelper
IDEPlaygroundExecutionCoordinator
IDEReadOnlyItemsManager
IDERunContextManager
IDERunContextManagerPerformance
IDERunDestination
IDERunDestinationPerformance
IDESchemeSheetOpening
IDESourceCodeCallersCalleesGeniusResultsFinder
IDESourceCodeIndexGeniusResultsFinder
IDESourceCodeNavigation
IDESourceCodeNavigationPerformance
IDESourceCodeSymbolsColoring
IDESourceCodeSymbolsColoringPerformance
IDESourceControl
IDESourceControlFileScanning
IDESourceControlProfiling
IDESourceControlTaskOperation
IDESourceEditorDropRecomputableState
IDESourceEditorTopLevelStructure
IDESourceKitService
IDESourceLanguageServiceSwift
IDESourceSyntaxColoringPrefetch
IDESyntaxColoringPerformance
IDETestManager
IDETestingHelperDebug
IDETextEncoding
IDETextIndex
IDEUpgradeTaskPerformanceMetric
IDEUtilityAreaPerformanceAspect
IDEVersionedFileManager
IDEWelcomeWindowPerformance
IDEWorkspaceClosing
IDEWorkspaceLoading
IDEWorkspaceUILoading
IndexingInfo
InstantOff
IntegrityChecking
LaunchRunPhase
MessageQueues
Modules
NativeBuilding
OperationStatus
Operations
OptionCategories
PersistedBuildResults
PlatformLoading
Plist
PlugInCompilers
PlugInTools
PluginLoading
PrecompiledHeader
ProfileScheme
ProjectLoading
ProjectLocalization
ProjectReference
ProjectSaving
ProjectTiming
PropertyValue
QuickHelp
RecursiveSearchPaths
RelevantToolSpecs
RunAlerts
SDKLoading
SimplePreprocessor
SourceFileFiltering
SpecificationLoading
SpecificationLoadingTiming
SpecificationsDebug
SupportedBuildTools
TSRegularExpression
Target
TargetCache
TargetCaches
ThreadedOperations
Unarchiving
WorkQueueProcessing
XBS
XCClangResultsPostprocessor
XCGccMakefileDependencies
XCPropertyValue
iPhoneSimulator

有三个日志级别
  • 紧急(默认)
  • 标准
  • 详细

  • 要更改日志级别,请将 LogLevel附加到方面名称并将其写入Xcode的首选项。例如,要获取有关SDK加载的详细日志,请键入以下命令:

    defaults write com.apple.dt.xcode DVTSDKLogLevel -int 3 && killall -u $USER cfprefsd

    要一次更改所有日志级别的 ,请使用DVTDefaultLogLevel首选项。但是您可能不想这样做,因为它很快就会变得太冗长。

    如果您不希望用户默认设置永久存储,则可以从终端运行Xcode并将用户默认设置作为参数传递:

    /Applications/Xcode.app/Contents/MacOS/Xcode -DVTSDKLogLevel 3

    关于Xcode内部调试日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32439215/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com