-
Notifications
You must be signed in to change notification settings - Fork 294
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
Python debugger dataviewer is broken if multiprocessing is used at some point earlier in the script #15290
Comments
I think that callstack should be impossible. Annotating it with the real class names
So the code should not call from |
it happens when |
I can't repro- if you could, it means that But the interface clearly states that |
I couldn't repro the original problem described, so I've optimistically marked it verified, but @sacha-hirsch please try out the latest prerelease and see if it's been fixed for you as well. |
I have some news ! First, the bad one : with the newest release, the error message doesn't come up anymore... but nothing else happens. So this is still not resolved. However, I noticed that this bug only happens when I have multiprocessing code running at some point earlier in the program (multiprocessing.Pool().map is called and resolved before the breakpoint where I'm peeking at the array) ! You can find attached two logs of the same program with the same breakpoint, one with multiprocessing enabled (multiprocessing.Pool().map is called and resolved earlier in the program; the bug appears) and one with multiprocessing disabled (multiprocessing.Pool().map is not called earlier in the program; no bug, data viewer works perfectly). The bug also disappears if the breakpoint is placed before the call of multiprocessing.Pool().map So, I guess a better title for this issue would be "dataviewer broken when multiprocessing is used earlier in the script" I should have checked with something closer to a minimal example before posting, sorry! Thank you all for your help! vscode_variable_peeking_bug_multiproc_enabled.txt |
Thanks for the details, could you also include some sample code? |
Here you go with a minimal example Commenting line 14 will make the bug disappear |
I have exactly the same problem as @sacha-hirsch Do we have an update to fix this bug? |
I had the same problem, but, in my case |
@leonmayer @bamurtaugh @hyepod @sacha-hirsch
|
Hello @DonJayamanne , This issue was probably categorized as "vscode-jupyter" because it deals with the dataviewer but it is first and foremost a python debugger issue, not a jupyter issue. FYI I just restested the minimal code with python 3.11 and the last version of VScode, and the bug is still there. Calling the multiprocessing module somewhere in the code will break the debugger dataviewer for all the following code lines , even if meanwhile the multiprocessing call has been resolved. Glad to see this issue is still being investigated. Best of luck ! |
Hey @DonJayamanne, this issue might need further attention. @sacha-hirsch, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
FYI as of today on the latest vscode stable release and python 3.11 the bug is still happening. I've already given a minimal example, I cannot provide any more info. Multiprocessing handling by the debugger is clearly broken. |
bringing this back to jupyter since this command is a jupyter contribution. This is likely because we're not paying attention to any thread ID in our debug watcher, and may not be able to without microsoft/vscode#63943 |
Applies To
What happened?
When debugging a python file (OS : Windows, Environnement : Anaconda), right clicking on a numpy array or a pandas dataframe in the "variables" side panel offers the option to "view the value in the data viewer" (it might not be the exact words, my vscode install is configured in another language).
When I click on it, an error appears : "Cannot read properties of undefined (reading 'disposed')". And nothing else happens.
I tried with both the prerelease and commercial versions of Jupyter, to no avail.
In the Jupyter logs, "xxxx" is my Windows session username
Here is my lanch.json code for the debugging configuration I'm using :
{ "version": "0.2.0", "configurations": [ { "name": "Python : fichier actif", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "justMyCode": false } ] }
VS Code Version
Version : 1.75.1 (user setup) Validation : 441438abd1ac652551dbe4d408dfcec8a499b8bf Date : 2023-02-08T21:32:34.589Z Electron : 19.1.9 Chromium : 102.0.5005.194 Node.js : 16.14.2 V8 : 10.2.154.23-electron.0 Système d’exploitation : Windows_NT x64 10.0.19044 Sandboxé : No
Jupyter Extension Version
v2023.1.2010391206 AND v2023.2.1000461014
Jupyter logs
Coding Language and Runtime Version
Python 3.9.7
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
conda 4.10.3
Running Jupyter locally or remotely?
None
The text was updated successfully, but these errors were encountered: