You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create files as above. Note that they are in the src subdirectory of the workspace.
Open workspace root (parent of src) in https://insiders.vscode.dev/?vscode-coi=
Open consume.py
"Run Python File in WASM"
Note that "success" is printed in the program output (Terminal pane)
"Debug Python File in WASM"
When debugger stops at top of file, press the "Continue" button in the debugging toolbar.
Expected behavior
Code runs successfully again and prints "success" in the program output (Debug Console pane)
Actual behavior
No "success" in program output. "Debug Console" shows the errors below. I think the "Bad file descriptor" may be a known issue, but note the ModuleNotFoundError.
If you move the two files from src to the workpace root, the code works as expected while debugging.
On desktop the code works as expected with the files in either location.
PDB debugger connected.
Traceback (most recent call last):
File "/$debug/main.py", line 12, in run
dbg._run(tgt)
File "/lib/python3.11/pdb.py", line 1646, in _run
self.run(target.code)
File "/lib/python3.11/bdb.py", line 597, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/workspace/src/consume.py", line 1, in <module>
from declare import func
ModuleNotFoundError: No module named 'declare'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/$debug/main.py", line 31, in <module>
run(debugger, target)
File "/$debug/main.py", line 25, in run
dbg.interaction(None, t)
File "/lib/python3.11/pdb.py", line 434, in interaction
self.print_stack_entry(self.stack[self.curindex])
File "/lib/python3.11/pdb.py", line 1553, in print_stack_entry
self.message(prefix +
File "/lib/python3.11/pdb.py", line 535, in message
print(msg, file=self.stdout)
OSError: [Errno 8] Bad file descriptor
The text was updated successfully, but these errors were encountered:
My suspicion is it's not running the file in the same folder as the file exists in. That would explain the 'ModuleNotFound' error. The bad file descriptor seems like a general problem with exception handling though. I can repro with throwing any exception.
Code Snippet
src/declare.py
src/consume.py
Repro Steps
src
subdirectory of the workspace.src
) inhttps://insiders.vscode.dev/?vscode-coi=
consume.py
Expected behavior
Code runs successfully again and prints "success" in the program output (Debug Console pane)
Actual behavior
No "success" in program output. "Debug Console" shows the errors below. I think the "Bad file descriptor" may be a known issue, but note the
ModuleNotFoundError
.If you move the two files from
src
to the workpace root, the code works as expected while debugging.On desktop the code works as expected with the files in either location.
The text was updated successfully, but these errors were encountered: