Cyberbrain
Cyberbrain copied to clipboard
Python debugging, redefined.
Currently, even if cyberbrain fails, new json files will be created. Relevant code: https://github.com/laike9m/Cyberbrain/blob/master/test/conftest.py#L128-L141
There are countless editors and IDEs out there. For convenience, I'll call them **environments**. I'd like to see Cyberbrain integrated with all of them, but this simply is not possible...
Fixes #147 Use `SymbolWithCustomValueStackItem` class to allow exceptions to be treated as normal variables.
[Python 3.10 changelog](https://docs.python.org/3.10/whatsnew/changelog.html#changelog) Bytecode changes can be found by viewing magic number change [history](https://github.com/python/cpython/blame/7d2b83e9f092a2ea1f715fe028f7c48324bee756/Lib/importlib/_bootstrap_external.py#L345-L354)  - [x] Make 'annotations' future by default [bpo-38605](https://bugs.python.org/issue38605) Undo making 'annotations' future by default [bpo-38605](https://bugs.python.org/issue38605)...
Python 3.10 removes the jump by duplicating some instructions at the loop's start. This way, there's only 1 jump when the loop exits, instead of 2 (to head then out)....
Jump instructions and other instructions are very different. Right now we have to pass a `jumped` indicator to the value stack, which is very weird. An instruction should either be...
 `ordinal` should be on line 17 not 29, `gifts` should be on line 32 not 44.
```python a = ValueError("sss") b = a ``` > 'c:\Users\laike9m\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\lib\python\debugpy\launcher' '58633' '--' 'c:\Users\laike9m\Desktop\cyberbrain-examples\rhymer.py' > Traceback (most recent call last): > File "c:\Users\laike9m\Desktop\cyberbrain-examples\rhymer.py", line 12, in > main() > File "C:\Users\laike9m\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\cyberbrain\tracer.py",...
If the trace graph gets really large, having linenos and header frozen to left and top of window might help.
So that we don't need to manually modify them each time something is changed.