Company
Date Published
Author
Alexandre Cai
Word count
654
Language
English
Hacker News points
None

Summary

Replit has introduced a new native toolset for inspecting and debugging web pages directly within its platform, addressing challenges users face with traditional browser developer tools, particularly on mobile devices and in restricted environments like schools. These Replit-native DevTools, powered by the open-source project Eruda, allow users to access the console, inspect the DOM, and more, via a simple interface. The implementation uses chobitsu, a JavaScript-based solution of the Chrome DevTools protocol, to ensure security and flexibility. The development team faced challenges related to permissions, security, and timing, particularly in ensuring the tools capture necessary debugging information before any JavaScript scripts run within the page. They resolved these by refining their approach to loading iframes and managing navigation, ensuring the DevTools remain functional across page loads and navigations. Users are encouraged to try this new feature, which enhances the development experience on both desktop and mobile devices, and those interested in contributing to Replit's frontend infrastructure are invited to join the team.