Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:05:29+00:00 2026-06-14T14:05:29+00:00

I have an app that I am trying to automatically debug using a shotgun

  • 0

I have an app that I am trying to automatically debug using a shotgun approach (randomly touching the app for a long period of time). I am currently using UIAutomation and this script:

var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();

target.delay(2);

window.tapWithOptions( { x:160.0, y:370.0 } );

target.delay(5);

for(i=0;i<=100000;i++)
{
    xPoint = Math.floor(Math.random()*319+1)
    yPoint = Math.floor(Math.random()*479+1)
    window.tapWithOptions( { x:xPoint, y:yPoint } );
}

This works, but unfortunately when it does eventually crash I have no debugging information that lets me know why, is there anyway I can tie the XCode debugger to this automation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:05:30+00:00Added an answer on June 14, 2026 at 2:05 pm

    First off, if you don’t mind the shameless plug, you might find my UI AutoMonkey project useful. It’s a tool that randomly generates events with all kinds of configurability to do what you call “shotgun” testing.

    So, to your question, it may be possible to get Instruments to break at the point that the crash happens. It’s not using the full debugger, but by using the Allocations instrument we can tell it to enable NSZombie detection.

    With your Automation Template open, make sure the application is closed and a trace isn’t being recorded. Open the instrument library and drag the Allocations instrument into the timeline. Click the “i” on that instrument and make sure the “Enable NSZombie Detection” checkbox is checked like in:

    Enable NSZombie detection

    Then, run your app with an automation test poking around and if it crashes with a memory problem, you’ll see the allocations instrument show a popup like in:

    Finding the Zombie

    Click the little arrow in the popup and you’ll jump to where the zombie was triggered. The stack at the time of the crash is in the right sidebar. You should be able to double click at any point in that stack and see the Objective C code where the memory crash occurred. There are some great WWDC videos available that walk through how to use the Allocations instrument. I’d recommend checking those out, too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that is using twitter-bootstrap and I am trying to implement
I have an app that I'm trying to figure out how to obtain the
I have an android app that I am trying to launch and it gives
I have an app that displays 9 UIImageViews, and I'm trying to add in
I have small web app that generate PDF files as a report. I'm trying
I have a legacy Java (not my native language) app that I'm trying to
I have an old iOS app that I never distributed and am now trying
I have a windows mobile app (mymobiler) that i am trying to install and
I have a console command line app that use NHibernate . I am trying
I'm just starting with applescript in xcode and currently have an app that asks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.