Back to Skills

mobile-app-debugging

aj-geddes
Updated Today
24 views
7
7
View on GitHub
Testingai

About

This Claude Skill helps developers debug mobile-specific issues like platform compatibility, device constraints, and connectivity problems. It provides guidance for diagnosing app crashes, performance bottlenecks, and network-related bugs on both iOS and Android. Use it when you need to troubleshoot problems that only occur in a mobile environment.

Documentation

Mobile App Debugging

Overview

Mobile app debugging addresses platform-specific issues, device hardware limitations, and mobile-specific network conditions.

When to Use

  • App crashes on mobile
  • Performance issues on device
  • Platform-specific bugs
  • Network connectivity issues
  • Device-specific problems

Instructions

1. iOS Debugging

Xcode Debugging:

Attach Debugger:
  - Xcode → Run on device
  - Set breakpoints in code
  - Step through execution
  - View variables
  - Console logs

View Logs:
  - Xcode → Window → Devices & Simulators
  - Select device → View Device Logs
  - Filter by app name
  - Check system logs for crashes

Inspect Memory:
  - Xcode → Debug → View Memory Graph
  - Identify retain cycles
  - Check object count
  - Monitor allocation growth

---

Common iOS Issues:

App Crash (SIGABRT):
  Cause: Exception in Objective-C
  Solution: Check console for error message
  Debug: Set breakpoint on exception

Memory Warning (SIGKILL):
  Cause: Too much memory usage
  Solution: Reduce memory footprint
  Optimize: Image caching, data structures

Networking:
  Issue: Network requests fail on device
  Check: Network connectivity status
  Solution: Implement Network Link Conditioner
  Test: Throttle network in Xcode

2. Android Debugging

Android Studio:

Attach Debugger:
  - Run → Debug
  - Set breakpoints
  - Step through code
  - Watch variables
  - Evaluate expressions

Logcat:
  - Displays all app logs
  - Filter by tag
  - Filter by process
  - Show errors and warnings

Device Monitor:
  - Memory profiler
  - CPU profiler
  - Network profiler
  - Battery usage

---

Common Android Issues:

App Crash (ANR):
  Cause: Long-running operation on main thread
  Solution: Move to background thread
  Example: Use AsyncTask or coroutines

Memory Leak:
  Cause: Activity not garbage collected
  Solution: Clear references in onDestroy
  Debug: Android Profiler shows retained objects

Networking:
  Issue: Network requests timeout
  Check: Network connectivity
  Solution: Implement timeout and retry
  Test: Simulate poor network

3. Cross-Platform Issues

React Native Debugging:

Console Logs:
  - Run app with: react-native run-android
  - View logs: adb logcat | grep ReactNativeJS
  - Or use remote debugger

Remote Debugging:
  - Shake device → Enable Remote Debugging
  - Chrome DevTools debugging
  - Set breakpoints in JS
  - Inspect state

Performance:
  - Perf Monitor: Shake → Perf Monitor
  - Shows FPS, RAM, Bridge traffic
  - Identify frame drops
  - Check excessive bridge calls

---

Flutter Debugging:

Device Logs:
  flutter logs
  Shows all device and app output

Debugging:
  flutter run --debug
  Set breakpoints in IDE
  Step through code

Hot Reload:
  Useful for rapid iteration
  Hot restart for full reload
  Useful for debugging UI changes

---

Common Mobile Issues:

Network Connectivity:
  Issue: App works on WiFi, fails on cellular
  Solution: Test on both networks
  Debug: Use network throttler
  Implement: Retry logic, offline support

Device Specific:
  Issue: Works on simulator, fails on device
  Solution: Always test on real device
  Causes:
    - Memory constraints
    - Performance differences
    - Platform differences
    - Screen size issues

Battery/Memory:
  Issue: Excessive battery drain
  Debug: Use power profiler
  Optimize: Reduce background work
  Monitor: Location tracking, networking

4. Mobile Testing & Debugging Checklist

Device Testing:

[ ] Test on both iOS and Android
[ ] Test on old and new devices
[ ] Test with poor network (3G throttle)
[ ] Test in airplane mode
[ ] Test with low battery
[ ] Test with low memory
[ ] Test with location disabled
[ ] Test with notifications disabled
[ ] Test rotation changes
[ ] Test while backgrounded

Performance:

[ ] <16ms per frame (60 FPS)
[ ] Memory usage <100MB
[ ] Battery drain acceptable
[ ] Network requests efficient
[ ] Background tasks minimal

Networking:

[ ] Works on WiFi
[ ] Works on cellular
[ ] Handles network timeouts
[ ] Handles offline mode
[ ] Retries failed requests
[ ] Shows loading indicators
[ ] Shows error messages

UI/UX:

[ ] Responsive touch targets (44x44 min)
[ ] Readable text (16pt minimum)
[ ] Colors accessible
[ ] Orientation changes handled
[ ] Keyboard shows/hides correctly
[ ] Safe areas respected (notches)

---

Tools:

Testing Devices:
  - iOS: iPhone SE (small), iPhone 12/13 (modern)
  - Android: Pixel 4 (standard), Pixel 6 (new)
  - Virtual: Simulators for iteration

Device Management:
  - TestFlight (iOS)
  - Google Play Beta (Android)
  - Firebase Test Lab
  - BrowserStack

Monitoring:
  - Crashlytics
  - Firebase Analytics
  - App Performance Monitoring
  - Custom event tracking

Key Points

  • Always test on real devices
  • Simulate poor network conditions
  • Monitor memory and CPU
  • Test on old and new devices
  • Use platform-specific debugging tools
  • Check device logs for crashes
  • Test network edge cases
  • Monitor battery/memory impact
  • Use profilers to identify bottlenecks
  • Implement proper error handling

Quick Install

/plugin add https://github.com/aj-geddes/useful-ai-prompts/tree/main/mobile-app-debugging

Copy and paste this command in Claude Code to install this skill

GitHub 仓库

aj-geddes/useful-ai-prompts
Path: skills/mobile-app-debugging

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

llamaguard

Other

LlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill