Chrome DevTools
Chrome DevTools is a built-in debugging tool in Chrome browser that helps inspect, analyze, edit, and debug web applications directly in the browser. Use it to inspect and debug WaveMaker mobile applications launched in web preview.
Overview
Chrome DevTools provides comprehensive debugging capabilities for web applications, including:
- Element inspection with live HTML/CSS editing
- JavaScript debugging with breakpoints and step-through
- Network monitoring for API calls and resource loading
- Performance profiling to identify bottlenecks
- Console for logs and JavaScript execution
- Memory profiling to detect leaks
Platform Support:
- ✅ Web Preview
- ❌ Expo (Go / Dev Build)
- ❌ Release Build (APK/IPA)
Chrome DevTools works with web preview only. For debugging on devices, use React Native DevTools or WavePulse.
Available Panels
Console
View logs, execute JavaScript, and interact with the running application.
Elements
Inspect HTML elements and CSS styles. Useful for debugging layout and style issues.
Sources
View and debug JavaScript source code with breakpoints.
Network
Monitor network activity including API calls, timing, and payloads.
Performance
Record and analyze page performance to identify bottlenecks.
Memory
View memory usage and detect memory leaks.
Application
Inspect storage (LocalStorage, SessionStorage), cookies, and cache.
Using Chrome DevTools
Launching DevTools
- Open project in WaveMaker Studio
- Click Preview button at the top to launch web preview
- After web preview loads, click REMOVE TOOLBAR
- Right-click anywhere on the page and select Inspect
- Chrome DevTools will open (docking position is customizable)
Keyboard Shortcuts
Open DevTools:
- Mac:
Cmd+Option+J(Console) orCmd+Option+I(Last panel) - Windows/Linux:
Ctrl+Shift+J(Console) orCtrl+Shift+I(Last panel)
Other shortcuts:
Cmd/Ctrl+Shift+C– Element inspectorCmd/Ctrl+P– Quick file searchCmd/Ctrl+Shift+P– Command menuEsc– Toggle console drawer
Inspecting Elements
Viewing Component Structure
- Open Elements panel
- Hover over elements to highlight them on the page
- Click elements to inspect their properties
Features:
- View HTML structure
- Inspect computed styles
- Edit CSS in real-time
- View event listeners
- Check accessibility properties
Elements panel shows HTML elements, not React components. To inspect React components, use React DevTools.
Editing Styles
- Select an element in Elements panel
- View Styles pane on the right
- Click on any CSS property to edit it
- Changes apply instantly to the preview
/* Edit styles directly in DevTools */
.button {
background-color: #007bff; /* Click to edit */
padding: 10px 20px; /* Add/remove properties */
}
Use cases:
- Quick style debugging
- Testing CSS changes before implementing
- Identifying conflicting styles
- Understanding inherited styles
Console Panel
Viewing Logs
The Console shows all logs, errors, and warnings from your application.
// Different log types
console.log('Info message');
console.warn('Warning message');
console.error('Error message');
console.info('Information');
console.debug('Debug message');
Filtering logs:
- Use filter buttons at the top (Errors, Warnings, Info, Verbose)
- Type in search box to filter by text
- Use
-textto exclude messages containing "text"
Executing JavaScript
Run JavaScript directly in the console:
// Access variables
selectedUser
// Call functions
loadUserData('user123')
// Test expressions
2 + 2
// Access DOM
document.querySelector('.user-card')
// Access app context
App.Variables.selectedProduct.dataSet
Grouping Logs
console.group('User Login Flow');
console.log('Validating credentials');
console.log('Calling authentication API');
console.log('Redirecting to dashboard');
console.groupEnd();
Timing Operations
console.time('data-load');
// ... perform operation
console.timeEnd('data-load');
// Output: data-load: 245ms
Sources Panel
Debugging JavaScript
- Open Sources panel
- Press
Cmd/Ctrl+Pto quickly find files - Type page name to open page scripts
- Click line numbers to set breakpoints
Breakpoint controls:
- Pause (F8) – Pause execution at next breakpoint
- Step Over (F10) – Execute current line and move to next
- Step Into (F11) – Step into function call
- Step Out (Shift + F11) – Step out of current function
- Continue (F8) – Resume execution
Setting Breakpoints
Line breakpoint:
function calculateTotal(items) {
// Click line number here to set breakpoint
const total = items.reduce((sum, item) => sum + item.price, 0);
return total;
}
Conditional breakpoint:
- Right-click line number
- Select "Add conditional breakpoint"
- Enter condition (e.g.,
item.price > 100) - Breakpoint only triggers when condition is true
Logpoints:
- Right-click line number
- Select "Add logpoint"
- Enter message to log (e.g.,
"Item:", item) - Logs message without pausing execution
Watch Expressions
Monitor specific variables or expressions:
- Expand Watch section in Sources panel
- Click + Add expression
- Enter variable name or expression
- Value updates as code executes
// Watch expressions
user.name
items.length
total > 1000
Network Panel
Monitoring Requests
View all network requests made by your application:
- Open Network panel
- Reload page to capture requests from start
- Click on any request to view details
Request details:
- Headers – Request/response headers
- Preview – Formatted response preview
- Response – Raw response data
- Timing – Request timing breakdown
- Cookies – Cookies sent/received
Filtering Requests
Use filter buttons to show specific request types:
- All – All requests
- XHR – API calls (fetch/XMLHttpRequest)
- JS – JavaScript files
- CSS – Stylesheets
- Img – Images
- Media – Audio/video
- Font – Web fonts
- Doc – HTML documents
- WS – WebSocket connections
Custom filters:
domain:api.example.com # Filter by domain
method:POST # Filter by method
status-code:404 # Filter by status
larger-than:1M # Filter by size
Analyzing Request Timing
Click on a request and view Timing tab to see:
- Queueing – Time waiting in queue
- Stalled – Time blocked before sending
- DNS Lookup – DNS resolution time
- Initial Connection – TCP handshake
- SSL – SSL/TLS negotiation
- Request Sent – Time sending request
- Waiting (TTFB) – Time to first byte
- Content Download – Time downloading response
Performance Panel
Recording Performance
- Open Performance panel
- Click Record button (or press
Cmd/Ctrl+ E) - Perform actions to analyze
- Click Stop to finish recording
What's captured:
- JavaScript execution
- Rendering and painting
- Network activity
- User interactions
- Memory usage
Analyzing Results
Main areas to check:
- Frames – FPS (aim for 60fps)
- Main Thread – JavaScript execution
- Raster – Paint operations
- GPU – Compositor work
Identifying bottlenecks:
- Long yellow bars = Long-running JavaScript
- Long purple bars = Layout/reflow issues
- Long green bars = Paint operations
Application Panel
Inspecting Storage
View and edit application storage:
Local Storage:
- View all key-value pairs
- Edit values directly
- Delete individual items
- Clear all storage
Session Storage:
- Similar to Local Storage
- Cleared when tab closes
Cookies:
- View all cookies
- Edit cookie values
- Delete cookies
- View cookie properties (domain, path, expiry)
Cache Storage:
- View cached resources
- Delete cached items
- Clear entire cache
Key Features
Live Editing
Edit code and see changes immediately:
HTML editing:
- Right-click element in Elements panel
- Select "Edit as HTML"
- Make changes
- Press
Ctrl/Cmd+ Enter to apply
CSS editing:
- Click any CSS value to edit
- Add new properties by clicking empty space
- Use arrow keys to increment/decrement values
- Hold
Shiftfor larger increments
Device Emulation
Test responsive design:
- Click Toggle Device Toolbar (or press
Cmd/Ctrl+Shift+M) - Select device from dropdown
- Choose orientation (portrait/landscape)
- Adjust zoom level
- Throttle network speed
Custom devices:
- Click "Edit" to add custom device dimensions
- Save frequently used configurations
Key Features and Limitations
Key Features:
- ✅ Works with web preview (quick launch from Studio)
- ✅ Inspect elements and edit CSS for quick debugging
- ✅ View logs and execute JavaScript in console
- ✅ Monitor network activity
- ✅ Debug JavaScript with breakpoints in Sources panel
- ✅ Performance profiling
- ✅ Memory leak detection
Limitations:
- ❌ Elements panel shows HTML, not React components
- ❌ Cannot debug native features (only work in web preview)
- ❌ Not available for device/emulator debugging
- ❌ Limited React-specific debugging features
Best Practices
1. Use Appropriate Panel
// ✅ Good - Use right tool
// Layout issues → Elements panel
// JavaScript bugs → Sources panel + breakpoints
// Slow API calls → Network panel
// Performance issues → Performance panel
// ❌ Bad - Using console.log for everything
2. Preserve Log
Enable "Preserve log" in Console and Network panels to keep logs across page navigations.
3. Use Workspaces
Map local files to DevTools for persistent editing:
- Open Sources panel
- Click Filesystem tab
- Add folder to workspace
- Edits in DevTools save to local files
4. Leverage Command Menu
Press Cmd/Ctrl + Shift + P to access command menu:
- Screenshot capture
- Coverage analysis
- Rendering tools
- And many more features
Related Documentation
Other Debugging Tools:
- React DevTools – React component inspection
- React Native DevTools – React Native debugging
- WavePulse – WaveMaker debugging tool
Testing Documentation:
- Debugging Overview – All debugging tools and methods
- UI Testing Mobile – Mobile testing strategies
- Unit Testing – Unit testing approaches
External Resources:
- Chrome DevTools Documentation – Official guide
- DevTools Tips – Weekly DevTools tips
- Chrome DevTools Protocol – Protocol documentation
Most modern browsers ship with similar DevTools. For Firefox, Safari, or Edge, check their respective documentation for browser-specific features.