-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Vscode does not hit break point in PyQt5 #317
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
Comments
I haven't been able to replicate this at my end. import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_()) Please could you provide with some sample code I could use to replicate this issue. |
Thank you for following-up. While trying to duplicate the break point
problem I discovered that I can no longer run a PyQt app, either my own
example or the code you sent, within VS Code. Here is the code I was
running:
import sysfrom PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
This code and the example you sent run from the command line with no
errors, but when I try to run in VS Code I get:
Traceback (most recent call last):
File "/home/tking/projects/pyqt/dj_window.py", line 2, in <module>
from PyQt5.QtWidgets import QApplication, QWidget
ImportError: No module named PyQt5.QtWidgets
Here is my launch.json:
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
Any ideas?
…On Mon, Jan 22, 2018 at 10:53 AM, Don Jayamanne ***@***.***> wrote:
I haven't been able to replicate this at my end.
I've tested this at my end using the following sample code and it works as
expected:
import sysfrom PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
Please could you provide with some sample code I could use to replicate
this issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH1mz5cD-TXeP21tknPdg78gkncc-lXks5tNNlAgaJpZM4QuUK->
.
|
Looks like you haven't got pyqt5 installed in your python environment (at least not in the environment used for debugging). |
I apologize, I must've not had the virtualenv activated before I ran VS
Code from the command line. However, I still have the original problem with
VS Code not hitting the breakpoint.
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget() # <======= Breakpoint set here
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
…On Mon, Feb 5, 2018 at 10:51 AM, Don Jayamanne ***@***.***> wrote:
ImportError: No module named PyQt5.QtWidgets
Looks like you haven't got pyqt5 installed in your python environment (at
least not in the environment used for debugging).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH1m0Kiy34O_x_kOUvOP0decHbdjzciks5tR03OgaJpZM4QuUK->
.
|
I think I have the exact same issue, looking forward to an answer. |
If above fails, then:
print(1)
print(2)
|
Because it has been more than a month since we requested more info, I'm closing this issue. If you are able to provide the info later then please do so and we can re-open the issue. |
Environment data
VS Code version: 1.18.1
Python Extension version: 0.8.0
Python Version: 3.5.2
OS and version: Linux 4.10.0-40-generic #44~16.04.1-Ubuntu SMP and Windows 10.0.16299 Build 16299
Actual behavior
Program does not stop at breakpoint.
Expected behavior
Program stops at breakpoint
Steps to reproduce:
Logs
Output from
Python
output panelNone
Output from
Console window
(Help->Developer Tools menu)None
The text was updated successfully, but these errors were encountered: