Bug 510836 - Force Eclipse CDT to stop debugging and rebuild after source file edit&save
Summary: Force Eclipse CDT to stop debugging and rebuild after source file edit&save
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: Next   Edit
Hardware: PC Windows 8
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 02:30 EST by Danijel Domazet CLA
Modified: 2020-09-04 15:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danijel Domazet CLA 2017-01-23 02:30:32 EST
I'd like to force Eclipse CDT to stop debugging and to rebuild the project after I edit & save the source file I am currently stepping through. 

Or at least to stop debugging after I press Build Project. Currently, after I change&save source file, and select Build Project, I get an error message: "cannot open output file myapp.exe: Permission denied". I have to: 
    - Terminate the app first, 
    - then do Build Project again and 
    - finaly Run it again. 

Happens all the time since I usualy edit the source and forget if I am in the debug mode or not.

The request is to add a feature which would in one step: 
    - Terminate the debuging session
    - Rebuild the project

Idealy, there would be a step 3 included too:
    - Relaunch the debug session which was interrupted with file edit. 

This would very quickly rebuild the changes and get me where I was before I edited sources. This would save so many clicks, and so much time in the debugging process.
Comment 1 Danijel Domazet CLA 2020-08-12 09:46:38 EDT
Still no news?
Comment 2 Jonah Graham CLA 2020-08-12 10:21:20 EDT
(In reply to Danijel Domazet from comment #1)
> Still no news?

Hi Danijel - this bug is a great enhancement idea. I am willing to help you contribute it if you want to work on it. At the moment there is no one scheduled to work on it.

That said, using the Launchbar you can get some of this resolved. When you press the "Debug" or "Run" button on the launchbar it will terminate the existing session before starting a new one. Using that may help your flow in the meantime.

The think about universally doing this feature is that some projects want the opposite to happen (and some vendors have implemented this already). On save and build they want the existing debug session to be updated with the changed code. Last time I used VC++ it did that (I assume it still does). Other languages do that too (such as Java).