Skip to content

Cannot stop at breakpoint when running on a physical device and can not show the console when running on a simulator #211

@magic3584

Description

@magic3584

It's so strange.

Here is my oc file:

- (void)viewDidLoad {
    [super viewDidLoad];
    
    static NSInteger a = 1;
    
    NSMutableArray * arr = [NSMutableArray new];
    NSString * s1 = @"1";
    NSString * s2 = [NSString stringWithFormat:@"1"];
    
    void (^Block)(NSInteger num) = ^(NSInteger num) {
        NSLog(@"%d",a);
        [arr addObject:@"1"];
    };
    
    a = 2;
    Block(a);
    NSLog(@"%@",arr);
    
    // Do any additional setup after loading the view.
}

launch.json

{
    "version": "0.2.0",
    "configurations": [
        
        {
            "type": "sweetpad-lldb",
            "request": "attach",
            "name": "SweetPad: Build and Run (Wait for debugger)",
            "preLaunchTask": "sweetpad: debugging-launch"
        }
    ]
}

SweetPad: 0.1.73
Xcode: 16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions