├── .gitignore ├── LICENSE ├── README.md ├── VariablesViewFullCopy.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── VariablesViewFullCopy.xcscheme ├── VariablesViewFullCopy ├── Classes │ ├── DVTUserNotificationCenter+VariablesViewFullCopy.h │ ├── DVTUserNotificationCenter+VariablesViewFullCopy.m │ ├── IDEVariablesView+VariablesViewFullCopy.h │ ├── IDEVariablesView+VariablesViewFullCopy.m │ ├── VariablesViewFullCopy.h │ └── VariablesViewFullCopy.m ├── Info.plist ├── JRSwizzle │ ├── JRSwizzle.h │ └── JRSwizzle.m ├── Prefix.pch └── XcodeHeaders │ ├── DVTFoundation.h │ ├── DVTKit.h │ ├── DebuggerLLDB.h │ └── IDEKit.h └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X Finder 2 | .DS_Store 3 | 4 | # Xcode per-user config 5 | *.mode1 6 | *.mode1v3 7 | *.mode2v3 8 | *.perspective 9 | *.perspectivev3 10 | *.pbxuser 11 | xcuserdata 12 | *.xccheckout 13 | 14 | # Build products 15 | build/ 16 | *.o 17 | *.LinkFileList 18 | *.hmap 19 | 20 | # Automatic backup files 21 | *~.nib/ 22 | *.swp 23 | *~ 24 | *.dat 25 | *.dep 26 | 27 | # Cocoapods 28 | Pods 29 | 30 | # AppCode specific files 31 | .idea/ 32 | *.iml 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | Copyright (c) 2015 Fabio Ritrovato. All rights reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | VariablesViewFullCopy 2 | ============================ 3 | 4 | ![VariablesViewFullCopy-Xcode](https://raw.githubusercontent.com/Sephiroth87/VariablesViewFullCopy-Xcode/master/screenshot.png) 5 | 6 | VariablesViewFullCopy is an Xcode that will let you copy the full tree description of an object in the Debug's area Variables View. 7 | 8 | ##Usage 9 | Right click any object from the Variables View and select "Full copy". 10 | Each child will only be copied once to avoid reference cycles, if they appear again their children will be replaced by a "[...]". 11 | **Caution:** some objects might take a lot to copy (some Xcode internal objects were taking hours and ultimately failed because the Mac ran out of memory), for now I added a cancel button to interrupt the process, but if anyone has better idea how to handle huge trees let me know :) 12 | 13 | ##Installation 14 | - Clone and build the project 15 | - Use [Alcatraz](https://github.com/supermarin/Alcatraz) 16 | 17 | Either way, restart Xcode to make it load 18 | 19 | ##Release notes 20 | ###1.1 21 | - Xcode7 support 22 | - Add cancel button to stop the copy 23 | - Add notifications for new releases 24 | 25 | ###1.0 26 | - Initial Release 27 | 28 | ##License 29 | Copyright (c) 2015. [Fabio Ritrovato](https://twitter.com/Sephiroth87) 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | 35 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 36 | -------------------------------------------------------------------------------- /VariablesViewFullCopy.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E51960691B872595009C2C8D /* DVTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E51960681B872595009C2C8D /* DVTKit.framework */; }; 11 | E52C9F8E1B85D70D005F3B54 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E52C9F8D1B85D70D005F3B54 /* AppKit.framework */; }; 12 | E52C9F901B85D70D005F3B54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E52C9F8F1B85D70D005F3B54 /* Foundation.framework */; }; 13 | E52C9F951B85D70D005F3B54 /* VariablesViewFullCopy.xcscheme in Resources */ = {isa = PBXBuildFile; fileRef = E52C9F941B85D70D005F3B54 /* VariablesViewFullCopy.xcscheme */; }; 14 | E52C9FAB1B85D90C005F3B54 /* IDEKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E52C9FAA1B85D90C005F3B54 /* IDEKit.framework */; }; 15 | E54ADEF01BAC696100044F61 /* DVTFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E54ADEEF1BAC696100044F61 /* DVTFoundation.framework */; settings = {ASSET_TAGS = (); }; }; 16 | E54ADEF41BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = E54ADEF31BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.m */; settings = {ASSET_TAGS = (); }; }; 17 | E58C5E001B8BC91800048685 /* JRSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = E58C5DFF1B8BC91800048685 /* JRSwizzle.m */; }; 18 | E58C5E061B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = E58C5E031B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.m */; }; 19 | E58C5E071B8BC93800048685 /* VariablesViewFullCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = E58C5E051B8BC93800048685 /* VariablesViewFullCopy.m */; }; 20 | E5C8A0291B8A4158000C1CB6 /* DebuggerLLDB in Frameworks */ = {isa = PBXBuildFile; fileRef = E5C8A0281B8A4158000C1CB6 /* DebuggerLLDB */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | E51960681B872595009C2C8D /* DVTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTKit.framework; path = ../SharedFrameworks/DVTKit.framework; sourceTree = DEVELOPER_DIR; }; 25 | E52C9F8A1B85D70D005F3B54 /* VariablesViewFullCopy.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VariablesViewFullCopy.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | E52C9F8D1B85D70D005F3B54 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 27 | E52C9F8F1B85D70D005F3B54 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 28 | E52C9F931B85D70D005F3B54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | E52C9F941B85D70D005F3B54 /* VariablesViewFullCopy.xcscheme */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = VariablesViewFullCopy.xcscheme; path = VariablesViewFullCopy.xcodeproj/xcshareddata/xcschemes/VariablesViewFullCopy.xcscheme; sourceTree = SOURCE_ROOT; }; 30 | E52C9FA51B85D7F7005F3B54 /* IDEKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDEKit.h; sourceTree = ""; }; 31 | E52C9FA91B85D8B2005F3B54 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; 32 | E52C9FAA1B85D90C005F3B54 /* IDEKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IDEKit.framework; path = ../Frameworks/IDEKit.framework; sourceTree = DEVELOPER_DIR; }; 33 | E54ADEEF1BAC696100044F61 /* DVTFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTFoundation.framework; path = ../SharedFrameworks/DVTFoundation.framework; sourceTree = DEVELOPER_DIR; }; 34 | E54ADEF11BAC698600044F61 /* DVTFoundation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTFoundation.h; sourceTree = ""; }; 35 | E54ADEF21BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DVTUserNotificationCenter+VariablesViewFullCopy.h"; sourceTree = ""; }; 36 | E54ADEF31BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DVTUserNotificationCenter+VariablesViewFullCopy.m"; sourceTree = ""; }; 37 | E56E85FB1B8689C900355BDD /* DVTKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DVTKit.h; sourceTree = ""; }; 38 | E58C5DFE1B8BC91800048685 /* JRSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JRSwizzle.h; sourceTree = ""; }; 39 | E58C5DFF1B8BC91800048685 /* JRSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JRSwizzle.m; sourceTree = ""; }; 40 | E58C5E021B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IDEVariablesView+VariablesViewFullCopy.h"; sourceTree = ""; }; 41 | E58C5E031B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IDEVariablesView+VariablesViewFullCopy.m"; sourceTree = ""; }; 42 | E58C5E041B8BC93800048685 /* VariablesViewFullCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VariablesViewFullCopy.h; sourceTree = ""; }; 43 | E58C5E051B8BC93800048685 /* VariablesViewFullCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VariablesViewFullCopy.m; sourceTree = ""; }; 44 | E5C8A0281B8A4158000C1CB6 /* DebuggerLLDB */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = DebuggerLLDB; path = ../PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB; sourceTree = DEVELOPER_DIR; }; 45 | E5C8A02A1B8A4164000C1CB6 /* DebuggerLLDB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DebuggerLLDB.h; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | E52C9F881B85D70D005F3B54 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | E52C9F8E1B85D70D005F3B54 /* AppKit.framework in Frameworks */, 54 | E52C9FAB1B85D90C005F3B54 /* IDEKit.framework in Frameworks */, 55 | E54ADEF01BAC696100044F61 /* DVTFoundation.framework in Frameworks */, 56 | E5C8A0291B8A4158000C1CB6 /* DebuggerLLDB in Frameworks */, 57 | E51960691B872595009C2C8D /* DVTKit.framework in Frameworks */, 58 | E52C9F901B85D70D005F3B54 /* Foundation.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | E52C9F811B85D70D005F3B54 = { 66 | isa = PBXGroup; 67 | children = ( 68 | E52C9F911B85D70D005F3B54 /* VariablesViewFullCopy */, 69 | E52C9F8C1B85D70D005F3B54 /* Frameworks */, 70 | E52C9F8B1B85D70D005F3B54 /* Products */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | E52C9F8B1B85D70D005F3B54 /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | E52C9F8A1B85D70D005F3B54 /* VariablesViewFullCopy.xcplugin */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | E52C9F8C1B85D70D005F3B54 /* Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | E5C8A0281B8A4158000C1CB6 /* DebuggerLLDB */, 86 | E52C9F8D1B85D70D005F3B54 /* AppKit.framework */, 87 | E52C9F8F1B85D70D005F3B54 /* Foundation.framework */, 88 | E54ADEEF1BAC696100044F61 /* DVTFoundation.framework */, 89 | E51960681B872595009C2C8D /* DVTKit.framework */, 90 | E52C9FAA1B85D90C005F3B54 /* IDEKit.framework */, 91 | ); 92 | name = Frameworks; 93 | sourceTree = ""; 94 | }; 95 | E52C9F911B85D70D005F3B54 /* VariablesViewFullCopy */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | E58C5E011B8BC93800048685 /* Classes */, 99 | E58C5DFD1B8BC91800048685 /* JRSwizzle */, 100 | E52C9FA41B85D7D5005F3B54 /* XcodeHeaders */, 101 | E52C9F921B85D70D005F3B54 /* Supporting Files */, 102 | ); 103 | path = VariablesViewFullCopy; 104 | sourceTree = ""; 105 | }; 106 | E52C9F921B85D70D005F3B54 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | E52C9F931B85D70D005F3B54 /* Info.plist */, 110 | E52C9FA91B85D8B2005F3B54 /* Prefix.pch */, 111 | E52C9F941B85D70D005F3B54 /* VariablesViewFullCopy.xcscheme */, 112 | ); 113 | name = "Supporting Files"; 114 | sourceTree = ""; 115 | }; 116 | E52C9FA41B85D7D5005F3B54 /* XcodeHeaders */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | E52C9FA51B85D7F7005F3B54 /* IDEKit.h */, 120 | E54ADEF11BAC698600044F61 /* DVTFoundation.h */, 121 | E56E85FB1B8689C900355BDD /* DVTKit.h */, 122 | E5C8A02A1B8A4164000C1CB6 /* DebuggerLLDB.h */, 123 | ); 124 | path = XcodeHeaders; 125 | sourceTree = ""; 126 | }; 127 | E58C5DFD1B8BC91800048685 /* JRSwizzle */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | E58C5DFE1B8BC91800048685 /* JRSwizzle.h */, 131 | E58C5DFF1B8BC91800048685 /* JRSwizzle.m */, 132 | ); 133 | path = JRSwizzle; 134 | sourceTree = ""; 135 | }; 136 | E58C5E011B8BC93800048685 /* Classes */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | E58C5E041B8BC93800048685 /* VariablesViewFullCopy.h */, 140 | E58C5E051B8BC93800048685 /* VariablesViewFullCopy.m */, 141 | E58C5E021B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.h */, 142 | E58C5E031B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.m */, 143 | E54ADEF21BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.h */, 144 | E54ADEF31BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.m */, 145 | ); 146 | path = Classes; 147 | sourceTree = ""; 148 | }; 149 | /* End PBXGroup section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | E52C9F891B85D70D005F3B54 /* VariablesViewFullCopy */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = E52C9F9E1B85D70D005F3B54 /* Build configuration list for PBXNativeTarget "VariablesViewFullCopy" */; 155 | buildPhases = ( 156 | E52C9F861B85D70D005F3B54 /* Sources */, 157 | E52C9F871B85D70D005F3B54 /* Resources */, 158 | E52C9F881B85D70D005F3B54 /* Frameworks */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = VariablesViewFullCopy; 165 | productName = VariablesViewFullCopy; 166 | productReference = E52C9F8A1B85D70D005F3B54 /* VariablesViewFullCopy.xcplugin */; 167 | productType = "com.apple.product-type.bundle"; 168 | }; 169 | /* End PBXNativeTarget section */ 170 | 171 | /* Begin PBXProject section */ 172 | E52C9F821B85D70D005F3B54 /* Project object */ = { 173 | isa = PBXProject; 174 | attributes = { 175 | LastUpgradeCheck = 0700; 176 | ORGANIZATIONNAME = "orange in a day"; 177 | TargetAttributes = { 178 | E52C9F891B85D70D005F3B54 = { 179 | CreatedOnToolsVersion = 6.4; 180 | }; 181 | }; 182 | }; 183 | buildConfigurationList = E52C9F851B85D70D005F3B54 /* Build configuration list for PBXProject "VariablesViewFullCopy" */; 184 | compatibilityVersion = "Xcode 3.2"; 185 | developmentRegion = English; 186 | hasScannedForEncodings = 0; 187 | knownRegions = ( 188 | en, 189 | ); 190 | mainGroup = E52C9F811B85D70D005F3B54; 191 | productRefGroup = E52C9F8B1B85D70D005F3B54 /* Products */; 192 | projectDirPath = ""; 193 | projectRoot = ""; 194 | targets = ( 195 | E52C9F891B85D70D005F3B54 /* VariablesViewFullCopy */, 196 | ); 197 | }; 198 | /* End PBXProject section */ 199 | 200 | /* Begin PBXResourcesBuildPhase section */ 201 | E52C9F871B85D70D005F3B54 /* Resources */ = { 202 | isa = PBXResourcesBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | E52C9F951B85D70D005F3B54 /* VariablesViewFullCopy.xcscheme in Resources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | /* End PBXResourcesBuildPhase section */ 210 | 211 | /* Begin PBXSourcesBuildPhase section */ 212 | E52C9F861B85D70D005F3B54 /* Sources */ = { 213 | isa = PBXSourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | E58C5E071B8BC93800048685 /* VariablesViewFullCopy.m in Sources */, 217 | E58C5E061B8BC93800048685 /* IDEVariablesView+VariablesViewFullCopy.m in Sources */, 218 | E54ADEF41BAC69CC00044F61 /* DVTUserNotificationCenter+VariablesViewFullCopy.m in Sources */, 219 | E58C5E001B8BC91800048685 /* JRSwizzle.m in Sources */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | /* End PBXSourcesBuildPhase section */ 224 | 225 | /* Begin XCBuildConfiguration section */ 226 | E52C9F9C1B85D70D005F3B54 /* Debug */ = { 227 | isa = XCBuildConfiguration; 228 | buildSettings = { 229 | ALWAYS_SEARCH_USER_PATHS = NO; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BOOL_CONVERSION = YES; 235 | CLANG_WARN_CONSTANT_CONVERSION = YES; 236 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 237 | CLANG_WARN_EMPTY_BODY = YES; 238 | CLANG_WARN_ENUM_CONVERSION = YES; 239 | CLANG_WARN_INT_CONVERSION = YES; 240 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 241 | CLANG_WARN_UNREACHABLE_CODE = YES; 242 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 243 | COPY_PHASE_STRIP = NO; 244 | ENABLE_STRICT_OBJC_MSGSEND = YES; 245 | GCC_C_LANGUAGE_STANDARD = gnu99; 246 | GCC_DYNAMIC_NO_PIC = NO; 247 | GCC_NO_COMMON_BLOCKS = YES; 248 | GCC_OPTIMIZATION_LEVEL = 0; 249 | GCC_PREPROCESSOR_DEFINITIONS = ( 250 | "DEBUG=1", 251 | "$(inherited)", 252 | ); 253 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 254 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 255 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 256 | GCC_WARN_UNDECLARED_SELECTOR = YES; 257 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 258 | GCC_WARN_UNUSED_FUNCTION = YES; 259 | GCC_WARN_UNUSED_VARIABLE = YES; 260 | MTL_ENABLE_DEBUG_INFO = YES; 261 | ONLY_ACTIVE_ARCH = YES; 262 | }; 263 | name = Debug; 264 | }; 265 | E52C9F9D1B85D70D005F3B54 /* Release */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | ALWAYS_SEARCH_USER_PATHS = NO; 269 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 270 | CLANG_CXX_LIBRARY = "libc++"; 271 | CLANG_ENABLE_MODULES = YES; 272 | CLANG_ENABLE_OBJC_ARC = YES; 273 | CLANG_WARN_BOOL_CONVERSION = YES; 274 | CLANG_WARN_CONSTANT_CONVERSION = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_EMPTY_BODY = YES; 277 | CLANG_WARN_ENUM_CONVERSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_UNREACHABLE_CODE = YES; 281 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 282 | COPY_PHASE_STRIP = NO; 283 | ENABLE_NS_ASSERTIONS = NO; 284 | ENABLE_STRICT_OBJC_MSGSEND = YES; 285 | GCC_C_LANGUAGE_STANDARD = gnu99; 286 | GCC_NO_COMMON_BLOCKS = YES; 287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 289 | GCC_WARN_UNDECLARED_SELECTOR = YES; 290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 291 | GCC_WARN_UNUSED_FUNCTION = YES; 292 | GCC_WARN_UNUSED_VARIABLE = YES; 293 | MTL_ENABLE_DEBUG_INFO = NO; 294 | }; 295 | name = Release; 296 | }; 297 | E52C9F9F1B85D70D005F3B54 /* Debug */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | COMBINE_HIDPI_IMAGES = YES; 301 | DEPLOYMENT_LOCATION = YES; 302 | DSTROOT = "$(HOME)"; 303 | FRAMEWORK_SEARCH_PATHS = ( 304 | "$(inherited)", 305 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Frameworks", 306 | "$(PROJECT_DIR)", 307 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/SharedFrameworks", 308 | ); 309 | GCC_PREFIX_HEADER = VariablesViewFullCopy/Prefix.pch; 310 | INFOPLIST_FILE = VariablesViewFullCopy/Info.plist; 311 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 312 | LIBRARY_SEARCH_PATHS = ( 313 | "$(inherited)", 314 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS", 315 | ); 316 | MACOSX_DEPLOYMENT_TARGET = 10.10; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | WRAPPER_EXTENSION = xcplugin; 319 | }; 320 | name = Debug; 321 | }; 322 | E52C9FA01B85D70D005F3B54 /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | COMBINE_HIDPI_IMAGES = YES; 326 | DEPLOYMENT_LOCATION = YES; 327 | DSTROOT = "$(HOME)"; 328 | FRAMEWORK_SEARCH_PATHS = ( 329 | "$(inherited)", 330 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Frameworks", 331 | "$(PROJECT_DIR)", 332 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/SharedFrameworks", 333 | ); 334 | GCC_PREFIX_HEADER = VariablesViewFullCopy/Prefix.pch; 335 | INFOPLIST_FILE = VariablesViewFullCopy/Info.plist; 336 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 337 | LIBRARY_SEARCH_PATHS = ( 338 | "$(inherited)", 339 | "$(SYSTEM_APPS_DIR)/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS", 340 | ); 341 | MACOSX_DEPLOYMENT_TARGET = 10.10; 342 | PRODUCT_NAME = "$(TARGET_NAME)"; 343 | WRAPPER_EXTENSION = xcplugin; 344 | }; 345 | name = Release; 346 | }; 347 | /* End XCBuildConfiguration section */ 348 | 349 | /* Begin XCConfigurationList section */ 350 | E52C9F851B85D70D005F3B54 /* Build configuration list for PBXProject "VariablesViewFullCopy" */ = { 351 | isa = XCConfigurationList; 352 | buildConfigurations = ( 353 | E52C9F9C1B85D70D005F3B54 /* Debug */, 354 | E52C9F9D1B85D70D005F3B54 /* Release */, 355 | ); 356 | defaultConfigurationIsVisible = 0; 357 | defaultConfigurationName = Release; 358 | }; 359 | E52C9F9E1B85D70D005F3B54 /* Build configuration list for PBXNativeTarget "VariablesViewFullCopy" */ = { 360 | isa = XCConfigurationList; 361 | buildConfigurations = ( 362 | E52C9F9F1B85D70D005F3B54 /* Debug */, 363 | E52C9FA01B85D70D005F3B54 /* Release */, 364 | ); 365 | defaultConfigurationIsVisible = 0; 366 | defaultConfigurationName = Release; 367 | }; 368 | /* End XCConfigurationList section */ 369 | }; 370 | rootObject = E52C9F821B85D70D005F3B54 /* Project object */; 371 | } 372 | -------------------------------------------------------------------------------- /VariablesViewFullCopy.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VariablesViewFullCopy.xcodeproj/xcshareddata/xcschemes/VariablesViewFullCopy.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 58 | 62 | 63 | 64 | 70 | 71 | 72 | 73 | 74 | 75 | 81 | 82 | 84 | 85 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/DVTUserNotificationCenter+VariablesViewFullCopy.h: -------------------------------------------------------------------------------- 1 | // 2 | // DVTUserNotificationCenter+VariablesViewFullCopy.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio on 18/09/2015. 6 | // Copyright © 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import "DVTFoundation.h" 10 | 11 | @interface DVTUserNotificationCenter (VariablesViewFullCopy) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/DVTUserNotificationCenter+VariablesViewFullCopy.m: -------------------------------------------------------------------------------- 1 | // 2 | // DVTUserNotificationCenter+VariablesViewFullCopy.m 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio on 18/09/2015. 6 | // Copyright © 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import "DVTUserNotificationCenter+VariablesViewFullCopy.h" 10 | #import "VariablesViewFullCopy.h" 11 | 12 | @implementation DVTUserNotificationCenter (VariablesViewFullCopy) 13 | 14 | + (void)load 15 | { 16 | NSError *error = nil; 17 | [self jr_swizzleMethod:@selector(userNotificationCenter:shouldPresentNotification:) withMethod:@selector(vvfc_userNotificationCenter:shouldPresentNotification:) error:&error]; 18 | [self jr_swizzleMethod:@selector(userNotificationCenter:didActivateNotification:) withMethod:@selector(vvfc_userNotificationCenter:didActivateNotification:) error:&error]; 19 | } 20 | 21 | - (BOOL)vvfc_userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification 22 | { 23 | if ([notification.userInfo[VariablesViewFullCopyNewVersionNotification] boolValue]) { 24 | return YES; 25 | } 26 | return [self vvfc_userNotificationCenter:center shouldPresentNotification:notification]; 27 | } 28 | 29 | - (void)vvfc_userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification 30 | { 31 | if ([notification.userInfo[VariablesViewFullCopyNewVersionNotification] boolValue]) { 32 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://github.com/Sephiroth87/VariablesViewFullCopy-Xcode#release-notes"]]; 33 | } 34 | [self vvfc_userNotificationCenter:center didActivateNotification:notification]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/IDEVariablesView+VariablesViewFullCopy.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEVariablesView+VariablesViewFullCopy.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import "IDEKit.h" 10 | 11 | @interface IDEVariablesView (VariablesViewFullCopy) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/IDEVariablesView+VariablesViewFullCopy.m: -------------------------------------------------------------------------------- 1 | // 2 | // IDEVariablesView+VariablesViewFullCopy.m 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import "IDEVariablesView+VariablesViewFullCopy.h" 10 | #import "DVTKit.h" 11 | #import "DebuggerLLDB.h" 12 | #import 13 | 14 | @interface IDEVariablesView (VariablesViewFullCopy) 15 | 16 | @property (nonatomic) NSButton *cancelButton; 17 | @property (nonatomic, assign, getter=isCancelled) BOOL cancelled; 18 | 19 | @end 20 | 21 | @implementation IDEVariablesView (VariablesViewFullCopy) 22 | 23 | + (void)load 24 | { 25 | [self jr_swizzleMethod:@selector(viewDidLoad) withMethod:@selector(vvfc_viewDidLoad) error:NULL]; 26 | [self jr_swizzleMethod:@selector(menuNeedsUpdate:) withMethod:@selector(vvfc_menuNeedsUpdate:) error:NULL]; 27 | } 28 | 29 | - (void)vvfc_viewDidLoad 30 | { 31 | [self vvfc_viewDidLoad]; 32 | NSButton *button = [NSButton new]; 33 | button.title = @"Cancel"; 34 | button.bezelStyle = NSRoundedBezelStyle; 35 | button.hidden = YES; 36 | [button setButtonType:NSMomentaryLightButton]; 37 | [[self.loadingIndicator superview] addSubview:button]; 38 | [button setTranslatesAutoresizingMaskIntoConstraints:NO]; 39 | [button.superview addConstraint:[NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.loadingIndicator attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0.0f]]; 40 | [button.superview addConstraint:[NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.loadingIndicator attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:40.0f]]; 41 | button.target = self; 42 | button.action = @selector(cancel); 43 | self.cancelButton = button; 44 | } 45 | 46 | - (void)vvfc_menuNeedsUpdate:(NSMenu *)menu 47 | { 48 | [self vvfc_menuNeedsUpdate:menu]; 49 | 50 | __block BOOL canShowMenu = NO; 51 | NSIndexSet *indexSet = [[self outlineView] contextMenuSelectedRowIndexes]; 52 | [indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 53 | IDEVariablesViewNode *root = [[self outlineView] itemAtRow:idx]; 54 | if ([root isKindOfClass:[IDEVariablesViewNode class]]) { 55 | canShowMenu = YES; 56 | } 57 | }]; 58 | 59 | if (canShowMenu) { 60 | NSInteger copyItemIndex = NSNotFound; 61 | NSInteger fullCopyItemIndex = NSNotFound; 62 | 63 | for (NSMenuItem *item in menu.itemArray) { 64 | if ([NSStringFromSelector(item.action) isEqualToString:@"copy:"]) { 65 | copyItemIndex = [menu.itemArray indexOfObject:item]; 66 | } else if ([NSStringFromSelector(item.action) isEqualToString:@"fullCopy"]) { 67 | fullCopyItemIndex = [menu.itemArray indexOfObject:item]; 68 | } 69 | } 70 | 71 | if (fullCopyItemIndex == NSNotFound && copyItemIndex != NSNotFound) { 72 | [menu insertItemWithTitle:@"Full copy" action:@selector(fullCopy) keyEquivalent:@"" atIndex:copyItemIndex + 1]; 73 | } 74 | } 75 | } 76 | 77 | - (NSString *)recursiveDescription:(DBGLLDBDataValue *)root depthPrefix:(NSString *)depthPrefix visitedValues:(NSMutableSet *)visitedValues 78 | { 79 | if (self.isCancelled) { 80 | return nil; 81 | } 82 | [root _fetchSummaryFromLLDBOnSessionThreadIfNecessary]; 83 | NSMutableString *description = [NSMutableString stringWithFormat:@"%@%@\t%@\t%@\t%@\n", depthPrefix, root.name, root.type, root.logicalValue, root.value]; 84 | if (root && ![root representsNilObjectiveCObject] && ![root representsNullObjectPointer]) { 85 | if (!root.childValuesCountValid) { 86 | [root _fetchChildValuesFromLLDBOnSessionThreadIfNecessary]; 87 | while (!root.childValuesCountValid) { 88 | } 89 | } 90 | BOOL visited = [visitedValues containsObject:root.value]; 91 | if ([root.value length] == 0 || [root.logicalValue isEqualToString:@"0x0"] || !visited) { 92 | [visitedValues addObject:root.value]; 93 | for (DBGLLDBDataValue *child in root.childValues) { 94 | NSString *childDescription = [self recursiveDescription:child depthPrefix:[depthPrefix stringByAppendingString:@"\t"] visitedValues:visitedValues]; 95 | if (childDescription) { 96 | [description appendString:childDescription]; 97 | } 98 | } 99 | } else if (visited && [root.childValues count]) { 100 | [description appendFormat:@"%@\t[...]\n", depthPrefix]; 101 | } 102 | } 103 | return [NSString stringWithString:description]; 104 | } 105 | 106 | - (void)fullCopy 107 | { 108 | NSIndexSet *indexSet = [[self outlineView] contextMenuSelectedRowIndexes]; 109 | [[NSPasteboard generalPasteboard] clearContents]; 110 | [indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 111 | IDEVariablesViewNode *root = [[self outlineView] itemAtRow:idx]; 112 | if ([root isKindOfClass:[IDEVariablesViewNode class]]) { 113 | DBGLLDBDataValue *value = [root dataValue]; 114 | DBGLLDBSession *session = [value _lldbSession]; 115 | [self _showLoadingIndicatorIfNecessary]; 116 | self.cancelButton.hidden = NO; 117 | self.cancelled = NO; 118 | [session addSessionThreadAction:^{ 119 | NSMutableSet *visitedValues = [NSMutableSet set]; 120 | NSString *description = [self recursiveDescription:root.dataValue depthPrefix:@"" visitedValues:visitedValues]; 121 | dispatch_async(dispatch_get_main_queue(), ^{ 122 | [self _hideLoadingIndicatorIfNecessary]; 123 | self.cancelButton.hidden = YES; 124 | [[NSPasteboard generalPasteboard] writeObjects:@[description]]; 125 | }); 126 | }]; 127 | } 128 | }]; 129 | } 130 | 131 | - (void)cancel 132 | { 133 | self.cancelled = YES; 134 | } 135 | 136 | #pragma mark - Properties 137 | 138 | - (NSButton *)cancelButton 139 | { 140 | return objc_getAssociatedObject(self, @selector(cancelButton)); 141 | } 142 | 143 | - (void)setCancelButton:(NSButton *)cancelButton 144 | { 145 | objc_setAssociatedObject(self, @selector(cancelButton), cancelButton, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 146 | } 147 | 148 | - (BOOL)isCancelled 149 | { 150 | return [objc_getAssociatedObject(self, @selector(isCancelled)) boolValue]; 151 | } 152 | 153 | - (void)setCancelled:(BOOL)cancelled 154 | { 155 | objc_setAssociatedObject(self, @selector(isCancelled), [NSNumber numberWithBool:cancelled], OBJC_ASSOCIATION_RETAIN_NONATOMIC); 156 | } 157 | 158 | @end 159 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/VariablesViewFullCopy.h: -------------------------------------------------------------------------------- 1 | // 2 | // VariablesViewFullCopy.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const VariablesViewFullCopyNewVersionNotification; 12 | 13 | @class VariablesViewFullCopy; 14 | 15 | static VariablesViewFullCopy *sharedPlugin; 16 | 17 | @interface VariablesViewFullCopy : NSObject 18 | 19 | @property (nonatomic, strong, readonly) NSBundle* bundle; 20 | 21 | + (instancetype)sharedPlugin; 22 | - (id)initWithBundle:(NSBundle *)plugin; 23 | 24 | 25 | @end -------------------------------------------------------------------------------- /VariablesViewFullCopy/Classes/VariablesViewFullCopy.m: -------------------------------------------------------------------------------- 1 | // 2 | // VariablesViewFullCopy.m 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #import "VariablesViewFullCopy.h" 10 | #import "DVTFoundation.h" 11 | 12 | NSString * const VariablesViewFullCopyNewVersionNotification = @"VariablesViewFullCopyNewVersionNotification"; 13 | 14 | @interface VariablesViewFullCopy() 15 | 16 | @property (nonatomic, strong, readwrite) NSBundle *bundle; 17 | @end 18 | 19 | @implementation VariablesViewFullCopy 20 | 21 | + (void)pluginDidLoad:(NSBundle *)plugin 22 | { 23 | static dispatch_once_t onceToken; 24 | NSString *currentApplicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"]; 25 | if ([currentApplicationName isEqual:@"Xcode"]) { 26 | dispatch_once(&onceToken, ^{ 27 | sharedPlugin = [[VariablesViewFullCopy alloc] initWithBundle:plugin]; 28 | }); 29 | } 30 | } 31 | 32 | + (instancetype)sharedPlugin 33 | { 34 | return sharedPlugin; 35 | } 36 | 37 | - (id)initWithBundle:(NSBundle *)plugin 38 | { 39 | if (self = [super init]) { 40 | self.bundle = plugin; 41 | NSString *currentVersion = [plugin objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; 42 | NSString *lastVersion = [[NSUserDefaults standardUserDefaults] stringForKey:@"VariablesViewFullCopyLastVersion"]; 43 | if (lastVersion == nil || [lastVersion compare:currentVersion options:NSNumericSearch] == NSOrderedDescending) { 44 | NSUserNotification *notification = [NSUserNotification new]; 45 | notification.title = [NSString stringWithFormat:@"VariablesViewFullCopy updated to %@", currentVersion]; 46 | notification.informativeText = @"View release notes"; 47 | notification.userInfo = @{VariablesViewFullCopyNewVersionNotification: @(YES)}; 48 | notification.actionButtonTitle = @"View"; 49 | [notification setValue:@YES forKey:@"_showsButtons"]; 50 | 51 | [[DVTUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; 52 | 53 | [[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:@"VariablesViewFullCopyLastVersion"]; 54 | } 55 | } 56 | return self; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.orangeinaday.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | DVTPlugInCompatibilityUUIDs 26 | 27 | FEC992CC-CA4A-4CFD-8881-77300FCB848A 28 | C4A681B0-4A26-480E-93EC-1218098B9AA0 29 | A2E4D43F-41F4-4FB9-BB94-7177011C9AED 30 | AD68E85B-441B-4301-B564-A45E4919A6AD 31 | 63FC1C47-140D-42B0-BB4D-A10B2D225574 32 | 37B30044-3B14-46BA-ABAA-F01000C27B63 33 | 640F884E-CE55-4B40-87C0-8869546CAB7A 34 | 992275C1-432A-4CF7-B659-D84ED6D42D3F 35 | A16FF353-8441-459E-A50C-B071F53F51B7 36 | 9F75337B-21B4-4ADC-B558-F9CADF7073A7 37 | E969541F-E6F9-4D25-8158-72DC3545A6C6 38 | 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 39 | AABB7188-E14E-4433-AD3B-5CD791EAD9A3 40 | 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 41 | 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 42 | CC0D0F4F-05B3-431A-8F33-F84AFCB2C651 43 | 7265231C-39B4-402C-89E1-16167C4CC990 44 | F41BD31E-2683-44B8-AE7F-5F09E919790E 45 | ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C 46 | 47 | LSMinimumSystemVersion 48 | $(MACOSX_DEPLOYMENT_TARGET) 49 | NSPrincipalClass 50 | VariablesViewFullCopy 51 | XC4Compatible 52 | 53 | XCPluginHasUI 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/JRSwizzle/JRSwizzle.h: -------------------------------------------------------------------------------- 1 | // JRSwizzle.h semver:1.0 2 | // Copyright (c) 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com 3 | // Some rights reserved: http://opensource.org/licenses/MIT 4 | // https://github.com/rentzsch/jrswizzle 5 | 6 | #import 7 | 8 | @interface NSObject (JRSwizzle) 9 | 10 | + (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_; 11 | + (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/JRSwizzle/JRSwizzle.m: -------------------------------------------------------------------------------- 1 | // JRSwizzle.m semver:1.0 2 | // Copyright (c) 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com 3 | // Some rights reserved: http://opensource.org/licenses/MIT 4 | // https://github.com/rentzsch/jrswizzle 5 | 6 | #import "JRSwizzle.h" 7 | 8 | #if TARGET_OS_IPHONE 9 | #import 10 | #import 11 | #else 12 | #import 13 | #endif 14 | 15 | #define SetNSErrorFor(FUNC, ERROR_VAR, FORMAT,...) \ 16 | if (ERROR_VAR) { \ 17 | NSString *errStr = [NSString stringWithFormat:@"%s: " FORMAT,FUNC,##__VA_ARGS__]; \ 18 | *ERROR_VAR = [NSError errorWithDomain:@"NSCocoaErrorDomain" \ 19 | code:-1 \ 20 | userInfo:[NSDictionary dictionaryWithObject:errStr forKey:NSLocalizedDescriptionKey]]; \ 21 | } 22 | #define SetNSError(ERROR_VAR, FORMAT,...) SetNSErrorFor(__func__, ERROR_VAR, FORMAT, ##__VA_ARGS__) 23 | 24 | #if OBJC_API_VERSION >= 2 25 | #define GetClass(obj) object_getClass(obj) 26 | #else 27 | #define GetClass(obj) (obj ? obj->isa : Nil) 28 | #endif 29 | 30 | @implementation NSObject (JRSwizzle) 31 | 32 | + (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_ { 33 | #if OBJC_API_VERSION >= 2 34 | Method origMethod = class_getInstanceMethod(self, origSel_); 35 | if (!origMethod) { 36 | #if TARGET_OS_IPHONE 37 | SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self class]); 38 | #else 39 | SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); 40 | #endif 41 | return NO; 42 | } 43 | 44 | Method altMethod = class_getInstanceMethod(self, altSel_); 45 | if (!altMethod) { 46 | #if TARGET_OS_IPHONE 47 | SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self class]); 48 | #else 49 | SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); 50 | #endif 51 | return NO; 52 | } 53 | 54 | class_addMethod(self, 55 | origSel_, 56 | class_getMethodImplementation(self, origSel_), 57 | method_getTypeEncoding(origMethod)); 58 | class_addMethod(self, 59 | altSel_, 60 | class_getMethodImplementation(self, altSel_), 61 | method_getTypeEncoding(altMethod)); 62 | 63 | method_exchangeImplementations(class_getInstanceMethod(self, origSel_), class_getInstanceMethod(self, altSel_)); 64 | return YES; 65 | #else 66 | // Scan for non-inherited methods. 67 | Method directOriginalMethod = NULL, directAlternateMethod = NULL; 68 | 69 | void *iterator = NULL; 70 | struct objc_method_list *mlist = class_nextMethodList(self, &iterator); 71 | while (mlist) { 72 | int method_index = 0; 73 | for (; method_index < mlist->method_count; method_index++) { 74 | if (mlist->method_list[method_index].method_name == origSel_) { 75 | assert(!directOriginalMethod); 76 | directOriginalMethod = &mlist->method_list[method_index]; 77 | } 78 | if (mlist->method_list[method_index].method_name == altSel_) { 79 | assert(!directAlternateMethod); 80 | directAlternateMethod = &mlist->method_list[method_index]; 81 | } 82 | } 83 | mlist = class_nextMethodList(self, &iterator); 84 | } 85 | 86 | // If either method is inherited, copy it up to the target class to make it non-inherited. 87 | if (!directOriginalMethod || !directAlternateMethod) { 88 | Method inheritedOriginalMethod = NULL, inheritedAlternateMethod = NULL; 89 | if (!directOriginalMethod) { 90 | inheritedOriginalMethod = class_getInstanceMethod(self, origSel_); 91 | if (!inheritedOriginalMethod) { 92 | SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); 93 | return NO; 94 | } 95 | } 96 | if (!directAlternateMethod) { 97 | inheritedAlternateMethod = class_getInstanceMethod(self, altSel_); 98 | if (!inheritedAlternateMethod) { 99 | SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); 100 | return NO; 101 | } 102 | } 103 | 104 | int hoisted_method_count = !directOriginalMethod && !directAlternateMethod ? 2 : 1; 105 | struct objc_method_list *hoisted_method_list = malloc(sizeof(struct objc_method_list) + (sizeof(struct objc_method)*(hoisted_method_count-1))); 106 | hoisted_method_list->obsolete = NULL; // soothe valgrind - apparently ObjC runtime accesses this value and it shows as uninitialized in valgrind 107 | hoisted_method_list->method_count = hoisted_method_count; 108 | Method hoisted_method = hoisted_method_list->method_list; 109 | 110 | if (!directOriginalMethod) { 111 | bcopy(inheritedOriginalMethod, hoisted_method, sizeof(struct objc_method)); 112 | directOriginalMethod = hoisted_method++; 113 | } 114 | if (!directAlternateMethod) { 115 | bcopy(inheritedAlternateMethod, hoisted_method, sizeof(struct objc_method)); 116 | directAlternateMethod = hoisted_method; 117 | } 118 | class_addMethods(self, hoisted_method_list); 119 | } 120 | 121 | // Swizzle. 122 | IMP temp = directOriginalMethod->method_imp; 123 | directOriginalMethod->method_imp = directAlternateMethod->method_imp; 124 | directAlternateMethod->method_imp = temp; 125 | 126 | return YES; 127 | #endif 128 | } 129 | 130 | + (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_ { 131 | return [GetClass((id)self) jr_swizzleMethod:origSel_ withMethod:altSel_ error:error_]; 132 | } 133 | 134 | @end 135 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix.pch 3 | // Pastel 4 | // 5 | // Created by Fabio on 10/07/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | #ifdef __OBJC__ 10 | @import Foundation; 11 | @import Cocoa; 12 | #import "JRSwizzle.h" 13 | #endif 14 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/XcodeHeaders/DVTFoundation.h: -------------------------------------------------------------------------------- 1 | // 2 | // DVTFoundation.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio on 18/09/2015. 6 | // Copyright © 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | @interface DVTUserNotificationCenter : NSObject 10 | 11 | + (id)defaultUserNotificationCenter; 12 | - (void)deliverNotification:(id)arg1; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/XcodeHeaders/DVTKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // DVTKit.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | @interface DVTOutlineView: NSOutlineView 10 | 11 | @property(readonly) NSIndexSet *contextMenuSelectedRowIndexes; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /VariablesViewFullCopy/XcodeHeaders/DebuggerLLDB.h: -------------------------------------------------------------------------------- 1 | // 2 | // DebuggerLLDB.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 23/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | @interface DBGLLDBSession : NSObject 10 | 11 | - (void)addSessionThreadAction:(void(^)())arg1; 12 | 13 | @end 14 | 15 | @interface DBGDataValue : NSObject 16 | 17 | @property(readonly, copy) NSString *type; 18 | @property(copy) NSString *value; 19 | @property(readonly, copy) NSString *logicalValue; 20 | 21 | @end 22 | 23 | @interface DBGLLDBDataValue : DBGDataValue 24 | 25 | @property(copy, nonatomic) NSString *name; 26 | 27 | @property(retain, nonatomic) NSArray *childValues; 28 | @property BOOL childValuesCountValid; 29 | 30 | - (void)_fetchSummaryFromLLDBOnSessionThreadIfNecessary; 31 | - (void)_fetchChildValuesFromLLDBOnSessionThreadIfNecessary; 32 | - (id)_lldbSession; 33 | - (BOOL)representsNullObjectPointer; 34 | - (BOOL)representsNilObjectiveCObject; 35 | - (id)value; 36 | 37 | @end -------------------------------------------------------------------------------- /VariablesViewFullCopy/XcodeHeaders/IDEKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // IDEKit.h 3 | // VariablesViewFullCopy 4 | // 5 | // Created by Fabio Ritrovato on 20/08/2015. 6 | // Copyright (c) 2015 orange in a day. All rights reserved. 7 | // 8 | 9 | @class DVTOutlineView; 10 | 11 | @interface IDEVariablesView : NSViewController 12 | 13 | @property __weak NSProgressIndicator *loadingIndicator; 14 | @property(retain) DVTOutlineView *outlineView; 15 | 16 | - (void)menuNeedsUpdate:(id)arg1; 17 | - (void)_hideLoadingIndicatorIfNecessary; 18 | - (void)_showLoadingIndicatorIfNecessary; 19 | 20 | @end 21 | 22 | @interface IDEVariablesViewNode : NSObject 23 | 24 | @property(readonly) id dataValue; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sephiroth87/VariablesViewFullCopy-Xcode/1eff6ab725afcc7e63fb4fc89d0c83c429c65339/screenshot.png --------------------------------------------------------------------------------