with one click
mobile-debugging
Debug React Native apps including metro bundler issues, native errors, performance problems, and crash analysis. Use when troubleshooting errors or investigating issues.
Menu
Debug React Native apps including metro bundler issues, native errors, performance problems, and crash analysis. Use when troubleshooting errors or investigating issues.
Professional frontend standards for building, scaffolding, extending, or reviewing any UI or frontend project — new or existing — even when standards aren't explicitly asked for. Keeps generated code consistent, reusable, secure, and production-quality. Framework-agnostic: React, Vue, Angular, Svelte, plain JS.
发布本地生成的 HTML、Markdown、TXT、PDF、Word 或 PPTX 到 ShareOne 平台,生成公网分享短链接;或者当用户提供 ShareOne 链接并要求下载文件、修改文件、拉取/处理评论时使用此技能。当用户要求“发布”、“分享”、“生成链接”、“上线”,或者“下载这个链接的文件”、“修改这个 ShareOne 链接的内容”、“拉取这个链接的评论”时,必须使用此技能。
Generate AI chat completions using GPT-4o through the verging.ai proxy API with streaming (SSE) and non-streaming response support.
Convert text to speech audio using OpenAI TTS-1-HD through the verging.ai proxy API. Supports multiple voices, playback speed control, and various audio output formats.
Generate AI images using DALL-E 3 or gpt-image-1 through the verging.ai proxy API. Supports standard and HD quality, multiple images per request, and returns CDN-hosted image URLs.
Analyze images using GPT-4o Vision through the verging.ai proxy API, supporting both image URL (JSON) and file upload (multipart) modes.
| name | mobile-debugging |
| description | Debug React Native apps including metro bundler issues, native errors, performance problems, and crash analysis. Use when troubleshooting errors or investigating issues. |
| allowed-tools | Bash, Read, Grep |
Debugging guide for React Native and Expo applications.
# Clear all caches
npx expo start --clear
watchman watch-del-all
rm -rf node_modules && npm install
# Reset packager cache
rm -rf /tmp/metro-*
rm -rf /tmp/haste-*
# iOS: Reset pods
cd ios && pod deintegrate && pod install && cd ..
# Android: Clean build
cd android && ./gradlew clean && cd ..
# Expo: Prebuild clean
npx expo prebuild --clean
# iOS: Reset simulator
xcrun simctl erase all
# Android: Wipe emulator data
adb devices # Find device ID
adb -s DEVICE_ID emu kill
# Install
npm install -g react-devtools
# Start
react-devtools
# In app: Shake device -> "Debug Remote JS"
# View detailed logs
npx expo start --verbose
# iOS device logs
npx react-native log-ios
# Android device logs
npx react-native log-android
adb logcat
// Enable network inspector
import { Platform } from 'react-native';
if (__DEV__ && Platform.OS === 'ios') {
require('react-native').NativeModules.DevSettings.setIsDebuggingRemotely(true);
}
// Or use Flipper for advanced network inspection
// Add performance logging
import { useEffect, useRef } from 'react';
function useRenderTime(componentName: string) {
const start = useRef(performance.now());
useEffect(() => {
const duration = performance.now() - start.current;
if (duration > 16) {
console.warn(`Slow render: ${componentName} took ${duration.toFixed(2)}ms`);
}
});
}
// Use in components
function MyComponent() {
useRenderTime('MyComponent');
return <View>...</View>;
}
// Check for missing cleanup
useEffect(() => {
const subscription = someObservable.subscribe();
const timer = setInterval(() => {}, 1000);
// MUST clean up!
return () => {
subscription.unsubscribe();
clearInterval(timer);
};
}, []);
# Look for error in stack trace
# Check recent file changes
# Verify imports and dependencies
# Check for typos in variable names
# iOS: Check Xcode console
# Android: Check Android Studio Logcat
# Look for Java/Swift exceptions
# Check native module compatibility
# Check package versions
npx expo-doctor
# Verify node/npm versions
node --version
npm --version
# Check for conflicting dependencies
npm ls PACKAGE_NAME
# Check what's using a port
lsof -ti:8081 # Metro bundler port
lsof -ti:19000 # Expo DevTools
# Kill process on port
kill -9 $(lsof -ti:8081)
# Check device connectivity
# iOS
xcrun simctl list devices
# Android
adb devices
# Restart adb
adb kill-server
adb start-server
When investigating issues: