-set up everything that you can debug a program -intentionally introduce a syntax error in your program -hit Alt-F9 -> compilation will fail -fix it, hit Alt-F9 -> warning that previous instance is still running, even if it never was started.
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
still happens
Git commit f051c8e3df8bf5ca9e8f8572d324900db316001e by Igor Kushnir. Committed on 20/01/2023 at 09:55. Pushed by igorkushnir into branch 'master'. Don't leak the debug session if a debug job finishes in destructor The constructor of a MI debug job creates a debug session. A debug session emits finished() and is destroyed when it finishes. A MI debug job finishes normally when its debug session emits finished(). When a MI debug job is killed, it calls MIDebugSession::stopDebugger(), which finishes the debug session. However, when a MI debug job is destroyed before it starts running, the debug session is leaked. A job should never leak resources, no matter when or how it is destroyed. If a MIDebugJob has a dependency, GdbLauncher::start() adds the MIDebugJob as the second subjob of an ExecuteCompositeJob. If an ExecuteCompositeJob is configured to abort on error (which is the default and almost always the case), when a subjob finishes with an error, the remaining subjobs are never started, the composite job finishes and is soon destroyed. The remaining subjobs are owned by the composite job and are destroyed along with it. This scenario happens when a MIDebugJob job depends on a build job, and the build job fails, e.g. because of a syntax error in the program. Without this commit, the job's debug session is not destroyed and the Debug area remains active in KDevelop then. ExecuteCompositeJob::doKill() does not kill the remaining subjobs if killing a subjob fails. Since ExecuteCompositeJob is a parent of its subjobs, the not-killed subjobs are eventually destroyed along with it. Furthermore, I believe that not-started subjobs should always be simply destroyed rather than killed, and plan to implement this change soon. FIXED-IN: 5.11.230400 M +11 -0 plugins/debuggercommon/midebugjobs.cpp M +1 -0 plugins/debuggercommon/midebugjobs.h https://invent.kde.org/kdevelop/kdevelop/commit/f051c8e3df8bf5ca9e8f8572d324900db316001e