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

Unverified Breakpoints with "Python" or "Integrated Teminal/Console" #87

Closed
DonJayamanne opened this issue Nov 13, 2017 · 13 comments · Fixed by #989
Closed

Unverified Breakpoints with "Python" or "Integrated Teminal/Console" #87

DonJayamanne opened this issue Nov 13, 2017 · 13 comments · Fixed by #989
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@DonJayamanne
Copy link

From @mike-pt on March 5, 2017 16:2

Environment data

VS Code version: 1.10.1
Python Extension version: 0.5.9
Python Version: 2.7
OS and version: Windows 10

Actual behavior

Trying to set break points on inner modules set then as Unverified Breakpoint and debugger skips those, setting than on the program file seems to work.

Expected behavior

It should be possible to create breakpoints anywhere in the code, even if its not the "program" file

Not sure if its related to my custom launch config, but I'm simply specifying args and the program to run

My launch.json (if dealing with debugger issues):

{
            "name": "runTest.py Integrated Terminal/Console",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceRoot}/runTest.py",
            "args" :[  
                "-l", "cpms",
                "-a", "true",
                "-t", "pms",
                "--run-type", "stagger",
                "--stagger-time", "10",
                "--se", "addLibraries",
                "-e", "stage"
            ],
            "cwd": null,
            "console": "integratedTerminal",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },

The same thing happens if I use args/program in a similar way on "python" (without Terminal/Console).

Keeping program as "${file}" also ends in the same behavior.

Copied from original issue: DonJayamanne/pythonVSCode#791

@DonJayamanne
Copy link
Author

From @mike-pt on March 6, 2017 15:53

I wonder if this is similar too --> microsoft/vscode-go#689 ?

The problem seems like the same, and maybe this can hint on a solution...

@DonJayamanne
Copy link
Author

From @mike-pt on May 10, 2017 14:32

This still happens in the most recent stable version on vscode and pythonVSCode, however its a bit different.

I'm able to "stop at the breakpoint" but its still marked unverified? :|

@DonJayamanne
Copy link
Author

From @gandhis1 on May 10, 2017 14:50

Yes, I can stop at the breakpoint, but it is never verified, even when it stops at the breakpoint. I reported this in #940 but I'm closing it as a duplicate of this one.

@DonJayamanne
Copy link
Author

From @mike-pt on July 6, 2017 23:15

any update on this?

@brettcannon brettcannon added awaiting 2-PR area-debugging bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@DonJayamanne
Copy link
Author

@mike-pt @gandhis1
Are you still experiencing this issue? If you are please could you provide some instructions to replicate this issue.

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed needs PR labels Feb 23, 2018
@mike-pt
Copy link

mike-pt commented Feb 27, 2018

Yes I still see it but it stops at the breakpoint as I mentioned in the last comment, I'm unsure if this is related to the fact that I'm calling args... in simpler scripts with just a "runsomefile.py" and no args...

or when using "${file}" it doesn't do it...

Also in the "running script" the breakpoints show "RED" and are not "unverified"

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Feb 27, 2018
@DonJayamanne
Copy link
Author

fact that I'm calling args... in simpler scripts with just a "runsomefile.py" and no args...

@mike-pt

  • Please could you provide the sample code
  • Please test debugging a simple python file with a print statement or the like.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed needs verification labels Mar 1, 2018
@mike-pt
Copy link

mike-pt commented Mar 2, 2018

Unfortunately this is code under NDA and I can't share any portion of it.

I might be able to use something else though... and see if it also happens, but so far in 2 projects where we have lots of classes/function and import from those this happens...

If I'm simply running a "sample.py" all the breakpoints work (come to think of it even with args... so that's not it)

Maybe the issue is more generic happens if the file is not the main script?

I'll do some more tests to check though

@mike-pt
Copy link

mike-pt commented Mar 2, 2018

Ok that seems to be the case files that are not the "running program" (i.e modules) get this unverified breakpoint issue...

I.E. using a simple moduletest.py (that I import on a main py file) I am literally copy pasting from:
https://en.wikibooks.org/wiki/A_Beginner%27s_Python_Tutorial/Importing_Modules

image

but on the main (test.py) file:
image

@mike-pt
Copy link

mike-pt commented Mar 2, 2018

Also I forgot to add I original reported this for Win 10 but this was just tested on OSX (Its still happening on Windows though)

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Mar 2, 2018
@DonJayamanne
Copy link
Author

@mike-pt

  • Please could you upload the sample repo you are using (with all of the launch.json, settings.json files)
  • Please provide instructions (step by step) on how to replicate

Thanks

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed needs verification labels Mar 5, 2018
@mike-pt
Copy link

mike-pt commented Mar 5, 2018

I simply copy pasted the code from the link above, to testdir/test.py and testdir\moduletest.py

Do you need me to upload that go gist? or something?

I'm using "cmd + shift+ D" on the mac with the test.py file opened while doing this
I select Python: Terminal (integrated)

As for the launch.json here it goes:
https://gist.github.com/mike-pt/ddd49ea9cb846d02649c8575cd203f21

And settings.json
https://gist.github.com/mike-pt/a7fdd3b0a170a219e3e5b8bd6084c03f

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Mar 5, 2018
@DonJayamanne DonJayamanne added this to the March 2018 milestone Mar 8, 2018
@DonJayamanne
Copy link
Author

Able to replicate when debugging Python unit tests.
Solution is for debugger to raise the Breakpoint event with the reason of changed.

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

Successfully merging a pull request may close this issue.

3 participants