Name 'false' is not defined when adding "justMyCode": false to launch.json in Visual Studio Code

Viewed 1234

I was just trying to debug my program in python in which I have a third party library (written always in python) that doesn't work as expected.

My launch.json file is:

{

"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "justMyCode": false
    }
  
]

}

But it gives me the error:

Name 'false' is not defined

as soon as I start debugging the problem.

Can someone help me please?

Thank you in advance,

1 Answers

This configuration triggers the run or debug of the currently focused file (see the "name": "Python: Current File", and "program": "${file}" settings) And the error message popups, because you tried to debug launch.json file - which makes no sense for a python debugger.

In other words - first, you have to switch to/focus your python file and trigger debug afterward.

Related