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
Breakpoint; debugging tests #399
Comments
Hi, |
As I understand it, Kahlan does not test the original source code, but rather creates a copy and adds its own code to the copy. This is made to mock static methods, but I have noticed that there is additional code inserted at the beginning and end of functions. I understand the purpose of these modifications, but as a developer, I would prefer if my code remains unchanged during testing. Is it possible to provide an option to disable the features that require copying and modification of the original source code, so that my code remains untouched during testing? |
Oh, after a short research I found that I can disable the patching via the following code in my $this->commandLine()->set('exclude', [
'Namespace'
]); This disables patching for all the classes in that namespace and now my breakpoints work again. Maybe it is a late reply @kale1d0code, but I hope it may still help you. |
Did you try to add |
Hi,
Thanks for Kahlan brilliant project,
however I have problems when it comes to debugging code I've written,
breakpoints won't trigger in files outside of the file where the test is defined
I understand that kahlan recreates code referenced in tests due to it's implementation etc and thats why the breakpoints aren't reached (because that file isn't actually being run)
Is there anyway around this or anything I can do in my IDE so that breakpoints work whilst tests are being run?
I'm using vscode
The text was updated successfully, but these errors were encountered: