Comments (4)
Hi,
You're totally right about your hypothesis. Indeed executed files are in the sys_get_temp_dir()
so I guess your breakpoints should be setted on the files there.
It's indeed not ideal and it's more a hack that an answer to your question.
But unfortunately, I'm not quite familiar with PHP debugger just player once or twice with them and finally stopped using them.
from kahlan.
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?
from kahlan.
Oh, after a short research I found that I can disable the patching via the following code in my kahlan-config.php
:
$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.
from kahlan.
Did you try to add xdebug_break()
in the code instead of breakpoints in your IDE? This should break in generated code as well.
from kahlan.
Related Issues (20)
- Throw exception test failed with Pipeline CI/CD HOT 2
- How to mock ZipArchive behavior HOT 4
- Expect to throw a `TypeError` got failed, `actual: TypeError, expected: TypeError` HOT 4
- Error with PHP 8 HOT 1
- Unable to run the tests when `XDEBUG_MODE` have multiple values HOT 1
- Feature Request: Support focusing a specific test or suite with command line arguments
- php 8.1 support HOT 2
- PHP Fatal error: Type of Kahlan\PhpErrorException::$file must be string (as in class Exception) in... HOT 3
- toBeCalled within Class Static Methods HOT 1
- Missing default value 0 for int properties with PHP8 attributes in single line HOT 1
- Unable to stub without overriding function HOT 5
- Process exit with code 1 in github action HOT 2
- stub / Modify constante HOT 1
- PHP 8.2: dynamic properties HOT 3
- PHP 8.2 Function utf8_decode() is deprecated HOT 1
- Support for never return type (PHP 8.1+) HOT 5
- Cannot exclude autoloaded files from monkey patching
- Multiple _T_ATTRIBUTE tokens in single line HOT 1
- Bug: toHaveLength() does not work with accented letters and multi-byte strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kahlan.