-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add browser devtool inspect url copy button to dev overlay #69357
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Tests Passed |
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
build cache
Diff detailsDiff for page.jsDiff too large to display Diff for middleware.jsDiff too large to display Diff for edge-ssr.jsDiff too large to display Diff for image-HASH.js@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[8358],
{
- /***/ 8908: /***/ (
+ /***/ 8176: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/image",
function () {
- return __webpack_require__(2111);
+ return __webpack_require__(934);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 6308: /***/ (module, exports, __webpack_require__) => {
+ /***/ 5057: /***/ (module, exports, __webpack_require__) => {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
__webpack_require__(1955)
);
const _head = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(2383)
+ __webpack_require__(7163)
);
- const _getimgprops = __webpack_require__(5640);
- const _imageconfig = __webpack_require__(2758);
- const _imageconfigcontextsharedruntime = __webpack_require__(899);
- const _warnonce = __webpack_require__(3878);
- const _routercontextsharedruntime = __webpack_require__(869);
+ const _getimgprops = __webpack_require__(5447);
+ const _imageconfig = __webpack_require__(1650);
+ const _imageconfigcontextsharedruntime = __webpack_require__(1953);
+ const _warnonce = __webpack_require__(5054);
+ const _routercontextsharedruntime = __webpack_require__(4445);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6501)
+ __webpack_require__(7406)
);
- const _usemergedref = __webpack_require__(3994);
+ const _usemergedref = __webpack_require__(3303);
// This is replaced by webpack define plugin
const configEnv = {
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
/***/
},
- /***/ 3994: /***/ (module, exports, __webpack_require__) => {
+ /***/ 3303: /***/ (module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -440,7 +440,7 @@
/***/
},
- /***/ 5640: /***/ (
+ /***/ 5447: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -456,9 +456,9 @@
return getImgProps;
},
});
- const _warnonce = __webpack_require__(3878);
- const _imageblursvg = __webpack_require__(4317);
- const _imageconfig = __webpack_require__(2758);
+ const _warnonce = __webpack_require__(5054);
+ const _imageblursvg = __webpack_require__(1731);
+ const _imageconfig = __webpack_require__(1650);
const VALID_LOADING_VALUES =
/* unused pure expression or super */ null && [
"lazy",
@@ -830,7 +830,7 @@
/***/
},
- /***/ 4317: /***/ (__unused_webpack_module, exports) => {
+ /***/ 1731: /***/ (__unused_webpack_module, exports) => {
"use strict";
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -885,7 +885,7 @@
/***/
},
- /***/ 8580: /***/ (
+ /***/ 9833: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -912,10 +912,10 @@
},
});
const _interop_require_default = __webpack_require__(4345);
- const _getimgprops = __webpack_require__(5640);
- const _imagecomponent = __webpack_require__(6308);
+ const _getimgprops = __webpack_require__(5447);
+ const _imagecomponent = __webpack_require__(5057);
const _imageloader = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(6501)
+ __webpack_require__(7406)
);
function getImageProps(imgProps) {
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -947,7 +947,7 @@
/***/
},
- /***/ 6501: /***/ (__unused_webpack_module, exports) => {
+ /***/ 7406: /***/ (__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -982,7 +982,7 @@
/***/
},
- /***/ 2111: /***/ (
+ /***/ 934: /***/ (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -999,8 +999,8 @@
// EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(5815);
- // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7771d3a7-20240827_re_h4bgdqagqtli4q7bnw2ajnn4vm/node_modules/next/image.js
- var next_image = __webpack_require__(1878);
+ // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7771d3a7-20240827_re_qz7eh3ruj3cscolfxbcb265hza/node_modules/next/image.js
+ var next_image = __webpack_require__(7649);
var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
/* harmony default export */ const nextjs = {
src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1030,12 +1030,12 @@
/***/
},
- /***/ 1878: /***/ (
+ /***/ 7649: /***/ (
module,
__unused_webpack_exports,
__webpack_require__
) => {
- module.exports = __webpack_require__(8580);
+ module.exports = __webpack_require__(9833);
/***/
},
@@ -1045,7 +1045,7 @@
/******/ var __webpack_exec__ = (moduleId) =>
__webpack_require__((__webpack_require__.s = moduleId));
/******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
- __webpack_exec__(8908)
+ __webpack_exec__(8176)
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__; Diff for 5867-HASH.jsDiff too large to display Diff for app-page-exp..ntime.dev.jsfailed to diff Diff for app-page-exp..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page.runtime.dev.jsfailed to diff Diff for app-page.runtime.prod.jsDiff too large to display Diff for app-route-ex..ntime.dev.jsDiff too large to display Diff for app-route-ex..time.prod.jsDiff too large to display Diff for app-route-tu..time.prod.jsDiff too large to display Diff for app-route-tu..time.prod.jsDiff too large to display Diff for app-route.runtime.dev.jsDiff too large to display Diff for app-route.ru..time.prod.jsDiff too large to display Diff for server.runtime.prod.jsDiff too large to display |
761d192
to
64842ce
Compare
Do we have docs where we can explain this functionality? I suspect I need to attach a debugger to get this feature to work? |
Good call, I'll follow up the docs in another PR (#69369). I need to add some screenshots which requires to update sth on next-site, can be done in paralell |
packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx
Outdated
Show resolved
Hide resolved
packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx
Outdated
Show resolved
Hide resolved
packages/next/src/client/components/react-dev-overlay/action-state.ts
Outdated
Show resolved
Hide resolved
86f7d90
to
14ff72b
Compare
What
Add a button to show Node.js inspector url while running Node.js inspect mode, which can let users to copy a devtool of current Node.js process (the process of Next.js server rather than the
next
binary process one). If you're running in the normal mode you won't see it.Video Clip of Usage
When you're running Next.js app with Node.js inspector. The little green button will be available.
The interaction is same as the copy button of error stack. And now we group them together in the same section, where is always accessible on the right side corner.
CleanShot.2024-08-29.at.13.06.58.mp4
When it's not availble such as it's not running with Node.js
--inspect
or the browser is not Chrome.It will become the button linking to the docs.
CleanShot.2024-08-29.at.13.01.57.mp4
Why
This is one way to provide better development experience for inspecting the server code. Chrome DevTool is pretty solid and it provides a lot of features such as adding debug points, revealing the source code on server side. But there's limitation of browser that it cannot directly open the DevTool with JS code, so we provide a copy button for now that users can still copy it and paste it and open it with another window
Closes NDX-246