Comments (7)
I'm not familiar with ipython but it's very likely that watchpoints does not work with ipython. However, I believe the part that does not work with ipython well is the print, because it's trying to access the file where the changes is written but in ipython it seems like that's not a file.
You can still caught the trigger of the variable change, but you need your own callback function. Check https://github.com/gaogaotiantian/watchpoints#customize-callback for more information. If you still have questions, feel free to ask!
from watchpoints.
@gaogaotiantian
thanks so much! will take a look later today.
from watchpoints.
@DanielGoldfarb oh wait, I think I was wrong. watchpoints can't support any kind of REPL, including ipython, because it's not able to parse the variable name from the file. You have to write a script(a file) to use the feature.
from watchpoints.
Hi @DanielGoldfarb, I just checked in the code for REPL support, including ipython. I think you can use it now.
from watchpoints.
@gaogaotiantian
Thanks. In the middle of something else right now. Will try to check it out next week. Much appreciated.
from watchpoints.
It could be nice if it would work with VSCode python debubger as well.
The error I see there is
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/conan/.local/lib/python3.6/site-packages/watchpoints/watch.py", line 28, in __call__
argnodes = getargnodes(frame)
File "/home/conan/.local/lib/python3.6/site-packages/watchpoints/util.py", line 57, in getargnodes
line = getline(frame)
File "/home/conan/.local/lib/python3.6/site-packages/watchpoints/util.py", line 33, in getline
with open(filename, "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '<string>'
from watchpoints.
Unfortunately, watchpoints requires source code to work, there's some black magic to make the UI super intuitive. I'm not super familiar with VSCode Python debugger, but there are two things that I'm pretty sure:
- It compiles the source code as string, so I don't think watchpoints can access the source code
- It uses sys.settrace to achieve debugger functions, which conflicts with watchpoints because watchpoints uses it as well
Overall, I doubt if watchpoints can be used with VSCode debugger, even with efforts to adapt it.
from watchpoints.
Related Issues (17)
- Make object compare better
- Windows 10 Error : UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 3322: character maps to <undefined> HOT 1
- Need conditional expressions HOT 1
- ENH : __eq__ operator when a pandas.DataFrame is involved HOT 10
- FileNotFoundError: [Errno 2] No such file or directory: '<stdin>' HOT 2
- Print to file/IO
- Only show diff for objects
- strange behavior when watching `os.environ` HOT 6
- AttributeError: 'NoneType' object has no attribute 'exists' HOT 8
- Output the result in oneline. HOT 8
- Add options to use pprint. HOT 8
- Doesnt work with pandas dataframes HOT 1
- Support other debuggers like pydevd HOT 1
- It doesn't seems to work with pdb in terminal? HOT 2
- Compatibility with Google Colab HOT 1
- Compatibility with Flask HOT 2
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 watchpoints.