Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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,

like image 409
ssera Avatar asked Feb 18 '26 12:02

ssera


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.

like image 61
Jakub Krafka Avatar answered Feb 21 '26 04:02

Jakub Krafka