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

Debug python have issue #12531

Closed
xuke444 opened this issue Jun 24, 2020 · 7 comments
Closed

Debug python have issue #12531

xuke444 opened this issue Jun 24, 2020 · 7 comments
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@xuke444
Copy link

xuke444 commented Jun 24, 2020

Environment data

  • VS Code version: 1.47.0 insider
  • Extension version (available under the Extensions sidebar): v2020.6.89148
  • OS and version: XXX
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: azureml
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: both jedi and microsoft have issues

Expected behaviour

debug should have current line highlighted and automatically show variable values when hoverover

Actual behaviour

current only has an edit cursor on current line, not highlighted, no variable hove over value display. only happen on some packages(not all)

Steps to reproduce:

  1. install package source code with pip install -e
    2.start a python file outside of package, and reference the code inside that package
    3.use vscode/python plugin to debug.
  2. when step into code inside package, vscode does not highlight current line, instead it shows regular edit icon, debug can still work line by line, but without high light, I cannot hover over parameter and see values, has to manually add them to watch, pretty annoying.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX


Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXXX

@xuke444 xuke444 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jun 24, 2020
@paulzhn
Copy link

paulzhn commented Jun 24, 2020

I have the same problem too, however things seem to be weird: I have the same version of vscode and python plugin on my physical OS and virtual OS (both windows 10), however, the debugger of python in vscode performs greatly on my physical OS, yet no highlight on virtual OS. And if I change version of vscode to the last one, everything will be fine.

@int19h
Copy link

int19h commented Jun 24, 2020

Installed packages are considered non-user code (same as standard library), and by default the debugger is configured to not debug it - so you can't step into it, breakpoints in it won't work etc.

If you want to debug installed packages, you need to set "justMyCode": false in your launch.json.

@int19h int19h added area-debugging and removed triage-needed Needs assignment to the proper sub-team labels Jun 24, 2020
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jun 24, 2020
@xuke444
Copy link
Author

xuke444 commented Jun 24, 2020

It is not the case.
I can step into package code, since I am using pip -e and package site in same folder as project I opened.
Debug can go line by line without issue and python executed in debugger perfectly.
It is just I cannot have current line high lighted.
It happened on some files but not others.

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 24, 2020
@paulzhn
Copy link

paulzhn commented Jun 25, 2020

2020-06-25-10-50

You can see that after starting the debugger, there's no highlight on the breakpoint line, only the cursor jumps to that line. I have tried to roll back vscode version to the last one, and the problem solved; however, after the auto update to lastest of vscode, the problem happens again.

@paulzhn
Copy link

paulzhn commented Jun 25, 2020

Seems like my issue is stranger than this one: I didn't see this issue only appears on some packages, however mine appears on any code...

@int19h
Copy link

int19h commented Jun 25, 2020

Original VSCode issue: microsoft/vscode#100805

@int19h
Copy link

int19h commented Jun 25, 2020

Since it's re-opened in vscode now, I'm going to close this one, so that there's only one open issue to track and comment on. If this turns out to be extension-specific after further investigation, please re-open.

@int19h int19h closed this as completed Jun 25, 2020
@ghost ghost removed the triage label Jun 25, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants