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

[FEATURE] Add ability to pass --inspect flag to node to debug test execution #294

Open
zacharyfmarion opened this issue Dec 18, 2022 · 3 comments

Comments

@zacharyfmarion
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When tests are unstable locally, it is hard to figure out why this would be happening.

Describe the solution you'd like
A clear and concise description of what you want to happen.

When we have run into issues with unstable or long running tests it has been useful to pass an --inspect flag to the node child process (just by editing the lib commonjs folder in reassure-cli). It would be nice if we could just run yarn reassure --baseline --inspect and have that flag automatically added. Or we could use the --inspect-brk option, or both. Assuming (but have not confirmed) this has the potential to affect the stability of test results, so we could have a big warning saying something along the lines of "You are running node with the --inspect flag, this should not be used in CI to measure performance as it can result in greater render variance".

I'd be happy to put up a PR with the change and some documentation.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Editing node modules is a bit of a pain but it is fine if we don't want to support this in the library.

Additional context
Add any other context or screenshots about the feature request here.

@thymikee
Copy link
Member

I'm good with that. @mdjastrzebski wdyt?

@Xiltyn
Copy link
Collaborator

Xiltyn commented Feb 7, 2023

I'm ok with that as long as we clearly describe that running with the flag is for debugging the process only. I would like to see a prompt in the command line after starting a script with the flag asking the user explicitly You're running the script with XYZ which may impact your measurements. Are you sure you want to continue? (y/N) or something along these lines.

A proper note in the docs would also be required as mentioned :)

I'm fine with that, @mdjastrzebski?

I would say it'd be best to wait until the CLI init command PR is merged because it adds things like enquirer and also unifies some stuff in the CLI package.

@mdjastrzebski
Copy link
Member

mdjastrzebski commented Mar 8, 2024

Seems like an interesting but pretty niche feature, that would require users to be familiar with nodes debugger, etc. We could support it if didn't affect regular users, but could be enabled e.g. by CLI flag.

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

No branches or pull requests

4 participants