Over a million developers have joined DZone.

Debug the Last Launched Application With Eclipse, and Other Debug Tricks

DZone's Guide to

Debug the Last Launched Application With Eclipse, and Other Debug Tricks

Learn how to speed up your debugging process by using tricks like ''debug last launched'' with Eclipse, and other tips found here.

· Performance Zone ·
Free Resource

SignalFx is the only real-time cloud monitoring platform for infrastructure, microservices, and applications. The platform collects metrics and traces across every component in your cloud environment, replacing traditional point tools with a single integrated solution that works across the stack.

My usual workflow is: edit, build, debug, and repeat. And this for the same project again and again. So, here are a few tips on how to make these iterations faster with Eclipse. One thing is to use the F11 shortcut to debug the last launched/debugged application:

Image title

Especially when working with multiple projects, I don't have to select the project I want to debug: it always will launch and debug the last one I was using. This setting is available with Eclipse Oxygen (e.g. MCUXpresso IDE 10.2).

That F11 shortcut might be different for you (check your menu entry). You can change/check the available shortcuts in the Eclipse workspace preferences, under General > Keys:

Image title

Note that I still have to terminate a running debug session. There is a "Terminate and Relaunch" setting in Eclipse CDT, but this one does not work reliably (at least not in CDT of Eclipse Oxygen, I have not checked this in Eclipse Photon yet).

But the MCUXpresso IDE (I'm using 10.2) has a nice extension to do the "terminate-and-debug-again" with a button in the Quickstart panel:

Image title

Note that this is using the currently selected project (marked in yellow above) and includes a build phase. I can skip the build part with the "Build (if required) before launching" setting workspace setting:

Image title

Of course, with that setting, I'm responsible for building before I debug if I have changed the sources.

In earlier Eclipse versions (e.g. Kinetis Design Studio 3.2.0, Eclipse 4.4 Luna), I have used the "always launch the previously launched application" to stick to the last launched application:

Image title

These tips and tricks help me to work faster with less mouse clicks. I hope you find these tips useful.

Happy debugging!

SignalFx is built on a massively scalable streaming architecture that applies advanced predictive analytics for real-time problem detection. With its NoSample™ distributed tracing capabilities, SignalFx reliably monitors all transactions across microservices, accurately identifying all anomalies. And through data-science-powered directed troubleshooting SignalFx guides the operator to find the root cause of issues in seconds.

performance ,debugging ,performance optimization ,tutorial ,eclipse

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}