Ned Batchelder
Ned Batchelder
*Original comment by* **Antony Lee (Bitbucket: [anntzer](https://bitbucket.org/anntzer), GitHub: [anntzer](https://github.com/anntzer))** ---------------------------------------- Perhaps it may be worth revisiting this now that Py3.7 optionally supports opcode tracing (if I understood https://bugs.python.org/issue31344 correctly)?
The Python settrace facility only offers feedback about lines executed. Supporting ternary-if and short-circuiting binary operators requires more details than Python offers. There are experiments about getting those details (http://nedbatchelder.com/blog/200804/wicked_hack_python_bytecode_tracing.html),...
This would be an amazing feature to implement, but has a number of challenges: - How do we know what byte codes *could* be executed? I think it's likely that...
@saroad2 I haven't even looked at bytecode tracing. You could experiment with the information that sys.settrace offers for bytecode-level tracing. There's a lot to do to make it useful I...
Thanks. I would rather have a config file setting for this, and not add a command line switch if that's OK with you.
@vstinner Yes, I am fine with using pythoncapi_compat.h. But when I try this pull request on main, I still have compile errors: ``` coverage/ctracer/tracer.c:533:48: error: no member named 'co_code' in...
I've solved the `co_code` problem using `PyObject_GetAttrString(code, "co_code")` in #1368. Can you take a look to see if there's something I've done wrong?
@vstinner I've gotten things to work in 956f0fde, but I would still rather use this approach when you have time to help me with it.
Thanks, though this doesn't seem to help #1310. :(
Thanks for the pull request. I haven't tried running it, but isn't this similar to what `coverage debug config` shows? If so, maybe we need to make it more apparent...