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
Extension version (available under the Extensions sidebar): 2019.2.5558
OS and version: macOS Mojave 10.14.3
Python version (& distribution if applicable, e.g. Anaconda): 3.7
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions: pytest==4.3.0
Expected behaviour
Run Test and Debug Test should execute from the same directory.
Actual behaviour
Run Test and Debug Test execute from different directories.
In my case, this means that all my python unit tests pass when I use Run Test, but I encounter ModuleNotFoundError using Debug Test.
It is unclear how to change the execution directories for Debug Test, relative to the ${workspaceFolder}, or if this is even possible.
^ Notice in the screenshot above that the sys.path is different for Run Test vs Debug Test.
Asides:
I have essentially nothing in my Global settings.json file.
I've reproduced this issue on Two different macOS systems.
Steps to reproduce:
git clone my demo/example github project (minimum code/files): https://github.com/bfrizb/demo_repo AND git checkout the vscode-python/issues/4674 branch.
Environment data
1.32.0
2019.2.5558
macOS Mojave 10.14.3
3.7
N/A
pytest==4.3.0
Expected behaviour
Run Test
andDebug Test
should execute from the same directory.Actual behaviour
Run Test
andDebug Test
execute from different directories.In my case, this means that all my python unit tests pass when I use
Run Test
, but I encounterModuleNotFoundError
usingDebug Test
.It is unclear how to change the execution directories for
Debug Test
, relative to the ${workspaceFolder}, or if this is even possible.^ Notice in the screenshot above that the
sys.path
is different forRun Test
vsDebug Test
.Asides:
settings.json
file.Steps to reproduce:
git clone
my demo/example github project (minimum code/files): https://github.com/bfrizb/demo_repo ANDgit checkout
thevscode-python/issues/4674
branch.demo_repo
in VSCodeRun Test
andDebug Test
to observe the difference in behavior. Here is a video demonstrating the problem.Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)For
Run Test
For
Debug Test
:The text was updated successfully, but these errors were encountered: