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

Do not enforce time limits when a debugging session through DBGp is active #4812

Closed
wikando-ck opened this issue Nov 3, 2021 · 5 comments
Closed
Assignees
Labels
feature/test-runner CLI test runner type/enhancement A new idea that should be implemented

Comments

@wikando-ck
Copy link

I frequently run into test timeouts when step debugging tests.
This effectively ruins step debugging, as a TimeoutException is thrown after the first step.

We enforce timeouts via config and run tests in strict mode.
My workaround is to change the test to @large manually.

I have researched setting the timeout via cli, which could be set in PHPStorm test runner configuration for debugging.
However, --enforce-time-limit has no param and only allows the opposite.
--default-time-limit <sec> - only for tests without @Small, @Medium or @large annotations.

I'd love to contribute a listener but have found no way to change the timeout configuration from inside a listener.
Any hints towards that would be appreciated.

@wikando-ck wikando-ck added the type/enhancement A new idea that should be implemented label Nov 3, 2021
@sebastianbergmann
Copy link
Owner

@derickr Can I detect in userland whether Xdebug's debugging is active?

@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Nov 3, 2021
@sebastianbergmann
Copy link
Owner

However, the best course of action would probably be to add a --do-not-enforce-time-limit CLI option.

@wikando-ck
Copy link
Author

@derickr Can I detect in userland whether Xdebug's debugging is active?

That's possible using xdebug_is_debugger_active

@sebastianbergmann
Copy link
Owner

That's possible using xdebug_is_debugger_active

Thank you. Sorry for the noise, @derickr.

@sebastianbergmann sebastianbergmann changed the title Disable test timeouts when using xdebug Do not enforce time limits when a debugging session through DBGp is active Nov 3, 2021
@sebastianbergmann sebastianbergmann self-assigned this Nov 3, 2021
@sebastianbergmann
Copy link
Owner

I have updated all maintained branches to check xdebug_is_debugger_active() and if there is an active debugging session through DBGp then execution timeouts will not be enforced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants