Ask questions"justMyCode" does not enable third party library debugging
<!-- Please search existing issues to avoid creating duplicates. -->
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'
)
After stepping in the train
function the debugger should take you to the definition of the function
Does not step into the function. Does not debug the third party code.
Behaves like justMyCode
is true
Debug: Tests
launch config from the Debugging explorerRun Test | Debug Test
menu that appears on each test
OR use the Python: Debug Test Method
commandFrame 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).
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.
Answer
questions
karthiknadig
@tahamr83 See if the solution recommended here helps https://github.com/microsoft/ptvsd/issues/2103
Related questions