Giter VIP home page Giter VIP logo

Comments (4)

jails avatar jails commented on May 25, 2024

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.

windaishi avatar windaishi commented on May 25, 2024

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.

windaishi avatar windaishi commented on May 25, 2024

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.

michalfelski avatar michalfelski commented on May 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.