Skip to content

Conversation

@KyeongJooni
Copy link

@KyeongJooni KyeongJooni commented Dec 13, 2025

Fixes #7661

What is it?

  • Docs / tests / types / typos

Description

Added a section to the debugging guide explaining how to find leftover console.log statements using stack traces. Includes examples for both client-side components and server-side entry files, plus alternative approaches with ESLint and IDE search.

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@KyeongJooni KyeongJooni requested a review from a team as a code owner December 13, 2025 08:29
@changeset-bot
Copy link

changeset-bot bot commented Dec 13, 2025

⚠️ No Changeset found

Latest commit: 0497e72

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

@KyeongJooni KyeongJooni force-pushed the docs/console-log-debugging branch from 309a74f to b8b969e Compare December 13, 2025 08:37
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks for your help @KyeongJooni

// root.tsx or layout.tsx
export default component$(() => {
// Override console.log to include stack traces
useVisibleTask$(() => {
Copy link
Member

Choose a reason for hiding this comment

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

I personally don't like this approach with visible tasks because you need to remember and remove them too.eslint seems to be the best way to tackle the problem.

Copy link
Author

@KyeongJooni KyeongJooni Dec 13, 2025

Choose a reason for hiding this comment

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

Thanks for the feedback @gioboa!
Thanks for the feedback! I've moved ESLint to the top as the primary recommendation. I kept the stack trace approach at the bottom since the original issue mentioned it can be helpful for identifying existing logs in codebases that are already cluttered. Added a note to remove it after debugging. Happy to adjust further if needed!

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@8203
npm i https://pkg.pr.new/@builder.io/qwik-city@8203
npm i https://pkg.pr.new/eslint-plugin-qwik@8203
npm i https://pkg.pr.new/create-qwik@8203

commit: b8b969e

@github-actions
Copy link
Contributor

github-actions bot commented Dec 13, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview b8b969e

@KyeongJooni KyeongJooni force-pushed the docs/console-log-debugging branch from d353133 to b8b969e Compare December 13, 2025 09:09
Reorganize the debugging documentation based on feedback:
- Move ESLint rules to the top as the recommended approach
- Add IDE search as a secondary option
- Keep stack trace method as temporary debugging technique
- Add warning notes about removing overrides after use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[📖] Please provide a section about what is your recommendation to find useless console.logs

2 participants