Skip to content

justMycode = false does not work #795

Closed

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

  1. int19h commented on Nov 30, 2021

    @int19h
    Contributor

    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?

  2. flyforwardFast commented on Dec 1, 2021

    @flyforwardFast
    Author
  3. Vishnu-Naik commented on Nov 10, 2022

    @Vishnu-Naik

    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.

  4. wangzhaode commented on Dec 21, 2023

    @wangzhaode

    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.

  5. Celica31 commented on Mar 11, 2024

    @Celica31

    it works for me,thank you guys so much.

  6. ALiwoto commented on Jun 14, 2024

    @ALiwoto

    I am experiencing the same issue with vscode python extension now and none of the solutions above is working....

  7. rchiodo commented on Jun 14, 2024

    @rchiodo
    Contributor

    ALi.w (@ALiwoto), VS code has a bug in 1.90 that is causing your problem. See the following issue:
    #1596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions