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" does not enable third party library debugging #10637

Closed
tahamr83 opened this issue Mar 18, 2020 · 2 comments
Closed

"justMyCode" does not enable third party library debugging #10637

tahamr83 opened this issue Mar 18, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@tahamr83
Copy link

tahamr83 commented Mar 18, 2020

Environment data

  • VS Code version: 1.43.3
  • OS and version: macOS Catalina 10.15.3
  • Python version: Python 3.6
  • Relevant/affected Python packages and their versions: unittest
  • Value of the python.languageServer setting: 0.5.31.0
    Setup
    launch.json
 {
            "name": "Debug: Tests",
            "type": "python",
            "request": "test",
            "justMyCode": false,
},

settings.json

{
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
    "python.testing.unittestArgs": [
        "-v",
        "-s",
        "/Users/tahazaidi/my_files/work_vocinity/agent-builder/tests",
        "-p",
        "test*.py"
    ],    
    "python.testing.pytestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.unittestEnabled": true,
    "python.analysis.symbolsHierarchyDepthLimit": 20,
    "python.pythonPath": ".venv/bin/python3.6"
}

Test Case

class TestInitialAction(TestCase):
    def test_mytest(self):
        agent = train(
            domain='tests/project/config/domain.yml',
            config='tests/project/config/config.yml',
            training_files='tests/project/data'
        )

Expected behaviour

After stepping in the train function the debugger should take you to the definition of the function

Actual behaviour

Does not step into the function. Does not debug the third party code.
Behaves like justMyCode is true

Steps to reproduce:

  1. Create a sample test case with usage of third party library function
  2. Discover Tests
  3. Add a breakpoint inside the function defintion or exactly on the method call
  4. Select the Debug: Tests launch config from the Debugging explorer
  5. Debug the test using the Run Test | Debug Test menu that appears on each test
    OR use the Python: Debug Test Method command
  6. Step into function

Logs

Frame skipped from debugging during step-in.
Note: may have been skipped because of "justMyCode" option (default == true). Try setting "justMyCode": false in the debug configuration (e.g., launch.json).

Additional Details

Changing the launch.json to (adding the console option)

        {
            "name": "Debug: Tests",
            "type": "python",
            "request": "test",
            "console": "integratedTerminal",
            "justMyCode": false,
        }

The terminal outputs an error. The debug breakpoints do not trigger even for my own code

env PTVSD_LAUNCHER_PORT=51104 /Users/tahazaidi/my_files/work_vocinity/agent-builder/.venv/bin/python3.6 /Users/tahazaidi/.vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/new_ptvsd/no_wheels/ptvsd/launcher /Users/tahazaidi/.vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/visualstudio_py_testlauncher.py --us=/Users/tahazaidi/my_files/work_vocinity/agent-builder/tests --up=test*.py --uvInt=2 --result-port=51101 -ttest_initial_action.TestInitialAction --testFile=/Users/tahazaidi/my_files/work_vocinity/agent-builder/tests/test_initial_action.py 
zsh: no matches found: --up=test*.py

If you remove the Debug: Tests launch object the above issue disappers but justMyCode still doesn't change the behavior.

@tahamr83 tahamr83 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 18, 2020
@karthiknadig
Copy link
Member

@tahamr83 See if the solution recommended here helps
microsoft/ptvsd#2103

@karthiknadig karthiknadig self-assigned this Mar 18, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 18, 2020
@tahamr83
Copy link
Author

Yes !! the "debugStdLib": true worked for me.

@ghost ghost removed the triage label Mar 19, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants