Relative Content

Tag Archive for pythonpython-3.xvisual-studio-code

vscode: in python, is there a way to know in code if a script is being run with F5 (“Start Debugging”) or Ctrl+F5 (“Run Without Debugging”)

I run a lot of scripts using VSCode interface and its launch configurations. Since my scripts all produce a lot of artefacts from running, it would be very useful to have an automated way to know if the script is running in debug mode (with F5 in vscode) as oposed to running without debugging (Ctrl+F5 in vscode), so that I could perform some cleanups at the beginning and end of the script’s run.

Why does MS Visual Code constantly adding an equal sign after a variable?

[Image] 1
As you can see that even though I’m not using “bo” (I actually used board here) MSVC is suggesting “bo=”. Where are they getting that equal sign from? I was doing practice codes yesterday like minesweeper and I get variable suggestions like “row=”, “col=”, and “dim_size=”