orcun-gokbulut / qml-debug

Visual Studio Code debugging support for Qt QML language
GNU General Public License v3.0
12 stars 5 forks source link

Breakpoints ignored on Windows 10 #1

Open flex-m opened 2 years ago

flex-m commented 2 years ago

I’ve written a small Python test project to test the QML debug extension with pyside2 and QtQuick.

Fortunately I did my first test on a Linux Mint system. On Linux everything works fine. The debug session stops on the first breakpoint in the QML file.

When I tried to run the same example on a Windows 10 system, the debugger connects to the QGuiApplication in the Python script, but all breakpoints were ignored.

The version of VS Code and the extensions are the same on both operating systems.

Where could be the problem? qml_debug_test.zip

orcun-gokbulut commented 2 years ago

Thanks for the issue,

Wow, I haven't even thought that it can be used with Python code. I have been developing extension on Linux workstation with c++ test applications.

I have to create a windows VM and try your python test code. It looks like some thing fishy going on with Qt's QDeclarative Debug Plugin on Windows. However I had to compile qt source code in debug mode with couple of assertation patches in order to debug it. So I need couple of days.

Thanks again for the report and sorry for the inconvenience.

Godhart commented 2 years ago

I have same issue on Windows 10 with PySide6 (haven't tried other hosts yet). Just wondering - could it be due to paths configuration? In example code of @flex-m there is following setting in the launch.json:

            "paths": {
                "qrc:/eertzz": "${workspaceFolder}"
            },

How to determine which is correct path for left part (qrc:/...) in case if this is QT for Python? Trying to check breakpoints on simple app with PySide6

Godhart commented 2 years ago

UPDATE: moved QML files into QRC (into it's root), but still no luck with breakpoints on Windows 10 My paths in launch.json are configured like this for this case:

            "paths": {
                "qrc:/": "${workspaceFolder}/path/to/folder/with/qml"
            },

On Linux host break points are working. But QML file content isn't shown IF QMLs are placed into QRC.

If QMLs are loaded with QUrl.fromLocalFile it's OK on Linux. Paths are configured as shown above in this message (QMLs are placed along with Python file)