RemoteJS:让前端调试跨越边界,触手可及
码不停提
RemoteJS 应运而生——一个轻量级、安全的远程 JavaScript 执行与调试平台,让代码调试突破环境限制,变得像发送消息一样简单。
码不停提
RemoteJS 应运而生——一个轻量级、安全的远程 JavaScript 执行与调试平台,让代码调试突破环境限制,变得像发送消息一样简单。
在日常前端开发中,你是否遇到过这样的困境?生产环境下的 bug 在本地无法复现,移动端真机调试困难重重,或者需要快速验证代码片段却不想部署完整流程?
RemoteJS 是一个基于 Web 的远程 JavaScript 代码执行与调试工具。它允许开发者将 JavaScript 代码片段安全地注入到指定网页中执行,实时查看结果,并捕捉错误与日志,无需复杂的环境配置或部署流程。

console.log()、console.error() 输出调试信息痛点:用户反馈生产环境有 bug,但本地开发环境无法复现 解决方案:直接在用户遇到问题的页面注入诊断代码,快速定位问题
// 检查特定元素状态
const problemElement = document.querySelector('.problem-component');
console.log('元素状态:', {
exists: !!problemElement,
styles: problemElement ? getComputedStyle(problemElement) : null,
dataAttrs: problemElement ? problemElement.dataset : null
});
痛点:移动端页面在真机上表现异常,但 PC 端调试工具无法直接连接 解决方案:在手机中打开目标页面,通过 RemoteJS 注入调试代码
// 检测移动端触摸事件
document.addEventListener('touchstart', (e) => {
console.log('触摸点:', e.touches[0].clientX, e.touches[0].clientY);
}, {passive: true});
痛点:无法直接对跨域 iframe 或第三方页面使用常规调试工具 解决方案:绕过跨域限制,安全地执行调试代码
// 检查 iframe 内容
const iframe = document.querySelector('iframe');
if (iframe) {
console.log('iframe 尺寸:', {
width: iframe.offsetWidth,
height: iframe.offsetHeight
});
}
痛点:需要验证某个想法或效果,但不想修改源码重新构建 解决方案:直接在现有页面上试验新功能
// 快速添加新功能原型
const newButton = document.createElement('button');
newButton.textContent = '新功能测试';
newButton.style.cssText = 'position:fixed;top:20px;right:20px;z-index:9999';
newButton.onclick = () => alert('功能测试成功!');
document.body.appendChild(newButton);
痛点:需要临时调整页面内容进行用户调研 解决方案:非侵入式地修改页面展示,收集用户反馈
// 临时修改页面文案
const headings = document.querySelectorAll('h1, h2, h3');
headings.forEach(h => {
const original = h.textContent;
h.setAttribute('data-original-text', original);
h.textContent = `[测试版] ${original}`;
});
痛点:在技术分享或教学时需要实时演示代码效果 解决方案:现场编写代码,实时展示运行结果,提升教学互动性
RemoteJS 重新定义了前端调试的边界——无论代码在何处运行,调试都可以触手可及。它不仅是问题排查的工具,更是创意验证的沙盒、教学演示的舞台。
让调试突破环境束缚,让创意无需等待部署。 立即体验 RemoteJS,开启高效调试新篇章!
访问地址:https://rx.sc.cn/dev-tools/remotejs 适用对象:前端开发者、测试工程师、技术讲师、产品原型设计师 无需下载,打开即用 🚀
RemoteJS - 因为调试,本该如此简单
暂无目录