-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 'evaluateName' for dataframe columns #1672
Comments
I don't believe there's any documentation on limitations with eval, but you can log the output of the debugger and add logging around eval to debug it yourself. Eval basically happens here: https://github.com/fabioz/PyDev.Debugger/blob/main/_pydevd_bundle/pydevd_safe_repr.py See this documentation on adding logging: What does it do when you eval a dataframe column? |
Hi @rchiodo, thanks for the quick response. Just to be clear, there is no problem with running an evaluate request on the column.
The problem I was referring to is this:
It seems that the resulting Compare with the top-level This property is important to us from an extension perspective since we don't know what code the user ran, but would like to be able to recreate the variable using an expression. |
So you were hoping evaluateName would list If you added a DataFrame one there, it might be able to resolve the column? Might have to be more specialized than that. |
Got it, thanks for the clarification and the link! I am mostly curious though why the default resolver seems to apply generally for Python objects, but not for Pandas DataFrames specifically (and the other scenarios I mentioned in the original post). For example, the following works (ie., we see evaluateName being shown for import pandas as pd
class Foo():
df = pd.read_csv("http://raw.githubusercontent.com/pwang347/cdn/master/titanic.csv")
series = df.Age
@property
def test(self):
df = pd.read_csv("http://raw.githubusercontent.com/pwang347/cdn/master/titanic.csv")
return df.Age
d = Foo()
d # <- breakpoint Does this issue belong in https://github.com/fabioz/PyDev.Debugger instead? And is the recommendation to look into making a contribution there after discussing more with the owner @fabioz? |
You can make the contribution in either place. Debugpy is what ships with VS code though, so any changes in PyDev.Debugger have to flow back to debugpy first. My guess why |
evaluateName
property
Hi there!
Our extension leverages the
evaluateName
DAP property to allow users to view and interact with nested variables through evaluate expressions while debugging. This works well when accessing top-level and nested data for simple lists, dictionary and class objects, but I've noticed some cases where this property is missing, e.g., the following:Is there more general information/documentation on what scenarios this property is or isn't supported (due to technical limitations or other reasons?)
I did also see #1439, but it wasn't clear to me if these were necessarily related to support for the
evaluateName
property.Thanks!
The text was updated successfully, but these errors were encountered: