Skip to content
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 client-side debugging instructions #28815

Merged
merged 8 commits into from Sep 16, 2021
Merged

Conversation

TyMick
Copy link
Contributor

@TyMick TyMick commented Sep 6, 2021

Fixes #16442

The instructions on the current Debugging page currently only work for server-side code, and furthermore, the page doesn't actually say that they only work for server-side code.

This update adds instructions for debugging client-side code in both VS Code and Chrome DevTools. It also improves the suggested VS Code launch configurations to take advantages of some relatively recent features in VS Code's built-in JavaScript debugger. Using the node-terminal and pwa-chrome launch types removes the need to manually pass an --inspect flag to the underlying Node.js process.

Let me know if there are any edge cases I didn't consider with these VS Code launch configs!

Documentation / Examples

  • Make sure the linting passes

The current instructions on the Debugging page currently only work for
server-side code, and furthermore, the page doesn't actually _say_ that
they only work for server-side code.

This update adds instructions for debugging client-side code in both VS
Code and Chrome DevTools. It also improves the suggested VS Code launch
configurations to take advantages of some relatively recent features in
VS Code's [built-in JavaScript debugger][1]. Using the `node-terminal`
and `pwa-chrome` launch types removes the need to manually pass an
`--inspect` flag to the underlying Node.js process.

[1]: https://github.com/microsoft/vscode-js-debug
@TyMick
Copy link
Contributor Author

TyMick commented Sep 10, 2021

Thanks for the helpful review, @styfle!

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks! 🎉

@kodiakhq kodiakhq bot merged commit c7e187f into vercel:canary Sep 16, 2021
bordeo pushed a commit to filoblu/next.js that referenced this pull request Sep 16, 2021
* canary: (41 commits)
  Add client-side debugging instructions (vercel#28815)
  v11.1.3-canary.19
  Update next-swc binaries (vercel#29132)
  Fix partial one off global selectors (vercel#29128)
  Update trace ignores for next import (vercel#29119)
  Development tracing improvements (vercel#29076)
  Remove log from failing to parse source map (vercel#29118)
  Remove inert font tag in font optimization (vercel#28869)
  v11.1.3-canary.18
  Update Redux example to use Toolkit + update dependencies. (vercel#29104)
  Ensure browser instances are not re-created un-necessarily (vercel#29091)
  Update styled-jsx (vercel#29103)
  v11.1.3-canary.17
  Add/styled jsx swc (vercel#29005)
  v11.1.3-canary.16
  Fix host segment replacing for custom routes (vercel#29090)
  Add stats config for SWC (vercel#28883)
  reload the page to show 404 when receiving `invalid` event from on-demand-entries (vercel#29074)
  Add crossOrigin type to the NextConfig (vercel#29033)
  Fix/upload binary artifact (vercel#29069)
  ...
@arealesramirez
Copy link

arealesramirez commented Sep 30, 2021

@leerob
Copy link
Member

leerob commented Sep 30, 2021

It will be updated with the next release of Next.js 😄

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect / missing documentation for debugging client-side javascript in VS Code
5 participants