Bug 375602 - Debug and run should save the current file when working in python
Summary: Debug and run should save the current file when working in python
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: general (show other bugs)
Version: 5.0.80
Platform: Appimage Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 413674 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-27 07:46 UTC by Joan
Modified: 2021-05-03 10:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joan 2017-01-27 07:46:53 UTC
I found that when working with python scripts, I have to manually save my files before debug or execute. This is a bit annoying because when I forget to save the file, an old version is launched giving unexpected results.
It would be nice to have an option (or a default in python) that would save the file on the moment I press any of those buttons (or at least a warning telling that an old version of the file will be launched)
For some background on this, and some workarounds, there is a thread in the forum here (https://forum.kde.org/viewtopic.php?f=218&t=138642)
Comment 1 Gaël de Chalendar (aka Kleag) 2020-09-29 20:17:19 UTC
I confirm the problem with current 5.2.2 AppImage version.

C++ programs can be automatically built with saved sources when ran or debugged. It should be the same for python project with custom build system (without the build step, obviously).

(I put the status as CONFIRMED. Is it allowed or reserved for the developers confirming the bug?)
Comment 2 Andrew Shark 2021-05-02 22:03:58 UTC
*** Bug 413674 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Shark 2021-05-02 22:13:15 UTC
I have found another workaround. In the "External Scripts" panel create a script. Add the command "%f". In "Save mode" option set "Save Active Document". Then assign a shortcut for the script. Then use that shortcut instead of Execute and Save buttons/shortcuts.
See the video for details: https://youtu.be/nQ5Iqr8-Ftc
Comment 4 Andrew Shark 2021-05-03 10:36:28 UTC
As I see it, the solution from the UI perspective is to add a similar "Save mode" option to the Launch Configurations window.