[kate] [Bug 505521] Impossible to debug python
https://bugs.kde.org/show_bug.cgi?id=505521 Waqar Ahmed changed: What|Removed |Added Status|REPORTED|RESOLVED Resolution|--- |FIXED Latest Commit||https://invent.kde.org/util ||ities/kate/-/commit/8af3900 ||eb66fec1084427abd0354727bfb ||e2ff3e --- Comment #3 from Waqar Ahmed --- Git commit 8af3900eb66fec1084427abd0354727bfbe2ff3e by Waqar Ahmed, on behalf of Aario Shahbany. Committed on 18/07/2025 at 19:43. Pushed by waqar into branch 'master'. Debugger: Improve DAP launch to prevent starting without a target Currently, trying to launch a DAP session (e.g., Python) with an empty executable path fails with an unhelpful error from the debug adapter, after temporarily enabling and then disabling the UI. This patch introduces two changes to create a better user experience: 1. In ConfigView::currentDAPTarget, if the executable path is empty, a warning dialog is now shown to the user instructing them to set the target path. The configuration is then invalidated to prevent the launch from proceeding. 2. In KatePluginGDBView::slotDebug, a check is added to ensure the configuration is valid before any debugger actions are taken. This prevents multiple warning dialogs and cleanly aborts the launch. This makes the behavior more intuitive and guides the user to the correct configuration step. Closes #505521 M +13 -3addons/gdbplugin/configview.cpp M +1-1addons/gdbplugin/configview.h M +17 -1addons/gdbplugin/plugin_kategdb.cpp https://invent.kde.org/utilities/kate/-/commit/8af3900eb66fec1084427abd0354727bfbe2ff3e -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 505521] Impossible to debug python
https://bugs.kde.org/show_bug.cgi?id=505521 --- Comment #2 from Aario --- Hello, I've investigated this issue further by compiling Kate from source and tracing the debugger's execution flow. I have submitted a Merge Request (!1797) that resolves the issue by improving the user experience. **Problem Analysis:** The root cause is how the debugger configuration is gathered for DAP-based debuggers like `debugpy`. 1. The `ConfigView::currentDAPTarget()` method in `addons/gdbplugin/configview.cpp` reads the executable path directly from the `m_executable` QLineEdit widget. 2. For interpreted languages like Python, a user often won't have anything in this box, expecting the IDE to use the currently open file. 3. This results in an empty string being passed as the `program` argument to the `DapBackend`, which causes the `debugpy` adapter to exit with the `Error: missing target` message. 4. This backend crash then causes the briefly-enabled debugger UI to immediately become disabled again, creating a very confusing "catch-22" for the user. **Proposed Solution in MR !1797:** My patch fixes this by making the UI much more instructive: 1. **In `configview.cpp`:** The `currentDAPTarget()` method now checks if the executable path is empty. If it is, it displays a `QMessageBox` that clearly instructs the user to set the target path in the debugger settings. It then signals that the launch should be aborted. 2. **In `plugin_kategdb.cpp`:** The `slotDebug()` method now checks for this failure signal from `currentDAPTarget()` and cleanly aborts the launch process before the backend is even started. This approach prevents the confusing backend error and directly guides the user on the correct workflow for configuring a debug target. It makes the behavior clear and intentional. Thank you for your consideration. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 505521] Impossible to debug python
https://bugs.kde.org/show_bug.cgi?id=505521 John Kizer changed: What|Removed |Added CC||[email protected] --- Comment #1 from John Kizer --- Possibly something similar to https://bugs.kde.org/show_bug.cgi?id=481691 ? -- You are receiving this mail because: You are watching all bug changes.
