Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2024, 20:06
wx69wx2023 wx69wx2023 is offline
Friend
 
Join Date: Sep 2023
Posts: 38
Rept. Given: 2
Rept. Rcvd 16 Times in 5 Posts
Thanks Given: 55
Thanks Rcvd at 125 Times in 26 Posts
wx69wx2023 Reputation: 16
Mac OS app debug

If you start the app with the following mysterious parameters, the hidden debug menu will be displayed.
"-_NS_4445425547 yes"


https://mjtsai.com/blog/2024/03/22/_eventfirstresponderchaindescription/#comment-4059578
Attached Images
File Type: jpg mmexport1712663870492.jpg (162.5 KB, 14 views)
File Type: jpg mmexport1712663874292.jpg (206.9 KB, 11 views)
Reply With Quote
The Following 2 Users Say Thank You to wx69wx2023 For This Useful Post:
tonyweb (04-13-2024), WRP (04-10-2024)
  #2  
Old 04-10-2024, 13:53
WRP WRP is offline
Family
 
Join Date: Nov 2010
Posts: 184
Rept. Given: 32
Rept. Rcvd 52 Times in 33 Posts
Thanks Given: 201
Thanks Rcvd at 231 Times in 105 Posts
WRP Reputation: 52
Good. But which debugger will be used?
Reply With Quote
  #3  
Old 04-10-2024, 20:37
Jupiter's Avatar
Jupiter Jupiter is offline
Lo*eXeTools*rd
 
Join Date: Jan 2005
Location: Moscow, Russia
Posts: 216
Rept. Given: 36
Rept. Rcvd 61 Times in 36 Posts
Thanks Given: 20
Thanks Rcvd at 153 Times in 44 Posts
Jupiter Reputation: 61
Just special menu

Quote:
Originally Posted by WRP View Post
But which debugger will be used?
This is not about running under the Xcode debugger, but about the appearance of the debug menu while running an application (even without debugger at all).

Using Radare2 rax2 command:

Code:
rax2 -S 'DEBUG'
Output:

Code:
4445425547


Adding per app setting in preferences (stored in ~/Library/Containers/)

Sample app is TextEdit (CFBundleIdentifier is com.apple.TextEdit):
Code:
defaults write com.apple.TextEdit _NS_4445425547 -bool true
Run app:

Code:
open -a TextEdit
You'll see bug icon in menu (before Help menu).


Adding global system setting in preferences

Code:
defaults write -g _NS_4445425547 -bool true
Reading global value:
Code:
defaults read -g _NS_4445425547
Sample output:
Code:
The domain/default pair of (kCFPreferencesAnyApplication, _NS_4445425547) does not exist
__________________
EnJoy!

Last edited by Jupiter; 04-10-2024 at 23:12. Reason: Per app and global defaults
Reply With Quote
The Following 2 Users Say Thank You to Jupiter For This Useful Post:
tonyweb (04-13-2024), wx69wx2023 (04-11-2024)
Reply

Tags
debug, macos


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 01:12.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )