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

Provide test:debug script alias that makes it easy to debug with any dev tools #345

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Jan 17, 2024

I was finding this useful when debugging tests I was writing. The --inspect flag to node sets up a debugging server on port 9229 which I connected to with Chrome using chrome://inspect and clicking Open dedicated DevTools for Node. Then all I had to do was put in debugger statements in the code where I wanted them.

I'm guessing that IDEs like VSCode has some built in tools that invoke node with this flag and connect for interactive debugging within the IDE. There may also be commandline debugging clients. I think this script alias should expose the node inspector allowing for developers to use whichever tool they prefer.

See https://nodejs.org/en/guides/debugging-getting-started

Copy link
Collaborator

@Dananji Dananji left a comment

Choose a reason for hiding this comment

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

👍

@cjcolvar cjcolvar merged commit e8eb356 into main Jan 23, 2024
2 checks passed
@cjcolvar cjcolvar deleted the test_debug branch January 23, 2024 14:13
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.

2 participants