nvda
dd1c1a93 - Fix debugging with VS Code (#18156)

Commit
1 year ago
Fix debugging with VS Code (#18156) Fixes #18154 Summary of the issue: Since using uv, debugging with VS Code is no longer functional. Description of user facing changes Debugging works again. Description of development approach There were actually two issues: When running NVDA from VS Code, it is run from the venv, therefore the UV environment variable is not set. Therefore we no longer check for this variable in nvda.pyw. We explicitly check whether the venv we're running in belongs to NVDA. This check didn't work properly in VS Code, as when running in the debugger, os.path.dirname("nvda.pyw") resolved to an empty string. This is fixed by retrieving the absolute path earlier in the process. The venv check is changed in such a way that it ensures that the parent folder of source and .venv is equal. Therefore, the cost of no longer checking uv explicitly is solved by having a stricter venv check.
Author
Parents
Loading