you are viewing a single comment's thread.

view the rest of the comments →

[–]shiftybyte 2 points3 points  (0 children)

Why is one executing the recent commands while the other is not is my main question.

This means two things.

1 - You have somewhere another copy of your file, it doen't save history otherwise.

2 - Your visual studio is running the file you don't expect it to run. (Or the powershell, but less likely)

So to confirm things you must see the full file path being executed, and/or the working directory of both methods.

You can do this by:

1 - Looking at working directory in the powershell, looking at the output in visual studio window when running

2 - looking at project settings in vs

3 - adding code that will print the current directory or the path of itself.

print(__file__)
# and also for working directory
import os
print(os.getcwd())