Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

justMycode = false does not work #795

Closed
1 task done
flyforwardFast opened this issue Nov 29, 2021 · 5 comments
Closed
1 task done

justMycode = false does not work #795

flyforwardFast opened this issue Nov 29, 2021 · 5 comments

Comments

@flyforwardFast
Copy link

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
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Nov 29, 2021
@int19h
Copy link
Collaborator

int19h commented 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
Copy link
Author

flyforwardFast commented Dec 1, 2021 via email

@Vishnu-Naik
Copy link

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.

  1. Instead of running a debugger from the Top right group menu of the editor, I ran it from below status bar as shown in the below picture

image

  1. Once clicked on this option a pop-up appears asking which launch.json you want to run your debugging with, as shown below.

image

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
Copy link

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.

  1. Instead of running a debugger from the Top right group menu of the editor, I ran it from below status bar as shown in the below picture

image

  1. Once clicked on this option a pop-up appears asking which launch.json you want to run your debugging with, as shown below.

image

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.

thanks! 1.85.1 has this problem and find nothong helpful solution util see your comments.

@Celica31
Copy link

it works for me,thank you guys so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants