Repository navigation
justMycode = false does not work #795
Description
VS Code version
1.62.3
Extension version
2021.11.1422169775
OS type
Windows
OS version
Windows_NT x64 10.0.19043
Python distribution
Anaconda
Python version
3.6.4
Language server
Pylance
Expected behaviour
This is an issue that initially posted to vscode but was asked to post in this forum (vscode - python).
I have been trying to change the justMycode from default "true" to "false", to debug into pytorch package but with no luck.
I have added the following code in the configurations( the second parenthesis is the newly added, the 1st one was by default). It did not work on 1.59 nor the most updated 1.62. What have gotten worse was the "python" after "type" in the configuration was not recognized anymore after upgrading from 1.59 to 1.62. The error was about "Configured debug type 'python' is installed but not supported in this environment."
PS: the code I used in the configuration was followed in this link https://code.visualstudio.com/docs/python/testing#_debug-tests
Please let me know if you could point me to the right direction and resolve the issue. Thank you in advance.
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "integratedTerminal",
"justMyCode": false
}
]
}
Actual behaviour
When debugging the code, I should be able to step into the Pytorch library if I set "JustMyCode" to false. Please refer to expected behavior for more details
Steps to reproduce
Please see expected behavior for more detail.
Basically I was just changing the lauch.json file as below, which should turn off the "JustMyCode" function but it did not.
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "integratedTerminal",
"justMyCode": false
}
]
}
Logs
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
int19h commentedon Nov 30, 2021
The "not supported in this environment" issue seems to be a dupe of microsoft/vscode-python#17952. Per that issue, it is already fixed in VSCode Insiders - can you please try that?
flyforwardFast commentedon Dec 1, 2021
Vishnu-Naik commentedon Nov 10, 2022
Recently, even I faced this issue where the VS code was not taking the latest launch.json (one with 'justMycode: false'). So, I had to perform the following steps.
You can click on launch.json here to edit the configuration file and now the debugger opens with the selected launch.json and 'justtMycode:false' setting will be applied.
wangzhaode commentedon Dec 21, 2023
thanks! 1.85.1 has this problem and find nothong helpful solution util see your comments.
Celica31 commentedon Mar 11, 2024
it works for me,thank you guys so much.
ALiwoto commentedon Jun 14, 2024
I am experiencing the same issue with vscode python extension now and none of the solutions above is working....
rchiodo commentedon Jun 14, 2024
ALi.w (@ALiwoto), VS code has a bug in 1.90 that is causing your problem. See the following issue:
#1596