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

docs(debug): add server-side debug guide WIP #12506

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theetrain
Copy link
Contributor

@theetrain theetrain commented Jul 26, 2024

Closes #7320

  • Adds server-side debugging instructions for Chrome dev tools (work in progress)

This PR is currently in draft to investigate rendering issues:

image


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Copy link

changeset-bot bot commented Jul 26, 2024

⚠️ No Changeset found

Latest commit: 1837cc9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +58 to +60
2. Run the `--enable-source-maps` and `--inspect` flags when starting the Vite
server with Node.js. For instance: `NODE_OPTIONS='--enable-source-maps
--inspect' vite dev` (these flags may also be passed before running `vite preview`)
Copy link
Member

Choose a reason for hiding this comment

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

let's keep all text as a single line and let the text editor handle wrapping

Suggested change
2. Run the `--enable-source-maps` and `--inspect` flags when starting the Vite
server with Node.js. For instance: `NODE_OPTIONS='--enable-source-maps
--inspect' vite dev` (these flags may also be passed before running `vite preview`)
2. Use the `--enable-source-maps` and `--inspect` flags when starting the Vite server with Node.js. For instance: `NODE_OPTIONS='--enable-source-maps --inspect' vite dev` (these flags may also be passed before running `vite preview`)

2. Open your site in a new tab. Typically at `localhost:5173`.
3. Open your browser's dev tools, and click on the "Open dedicated DevTools for Node.js" icon near the top-left. It should display the Node.js logo.
4. Set up breakpoints and debug your application.
1. TBD
Copy link
Member

Choose a reason for hiding this comment

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

I assume the TBD was going to be something like this?

Suggested change
1. TBD
1. Add `build: { sourcemap: true }` to your Vite config file

@eltigerchino
Copy link
Member

eltigerchino commented Oct 10, 2024

I can't seem to replicate the visual issue mentioned in the PR description. See the same section on the preview website at https://kit-svelte-qlsa25usm-svelte.vercel.app/docs/debugging#visual-studio-code . This PR should be good to be continued👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: setting up source maps for server-side code
3 participants