Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I debug two projects in eclipse at the same time?

I have two projects: consle and android project. I want to compare the values of variables because the same code (as I think) gives different results. I have to find the error. If I press the F6 button the state changes just in one project. Is it possible to switch the debugging project on the fly?

like image 359
Vyacheslav Avatar asked Aug 23 '13 05:08

Vyacheslav


People also ask

How do I debug multiple threads in Eclipse?

Start debug session. When the breakpoint in run is hit, you can go to another breakpoint, enable that breakpoint if it was disabled. Then right click on the breakpoint -> go to Filters, now you can select the thread you want the breakpoint to be remain enabled for and you can uncheck the rest of the threads.

Why might you create multiple debug configuration for the same project?

If you are working in a team, you might want to share your run/debug configurations so that your teammates could run the application using the same configuration or enable them to remotely attach to the process you are running.

How do I select multiple projects in Eclipse?

Now go to File > Import... and select "Projects from Folder or Archive" option under the General section. Click on Directory and choose the folder "Test" which is the one that we want to hold multiple java projects. Click on Finish.


2 Answers

Put breakpoints in both projects and launch them in debug mode.

Switch to "Debug" perspective and find "Debug" view there. You will see a list of active debug sessions with their respective call stacks. You can click on every debug step of every debug session and Eclipse will open that step in code editor. "Variables" view will also be updated.

like image 137
sergej shafarenka Avatar answered Oct 19 '22 05:10

sergej shafarenka


  • Run both projects
  • Open console-window
  • On the right in the console-window there is a button that says "Display Selected Console"
  • Switch between your projects console-windows
like image 26
Gjerdingen Avatar answered Oct 19 '22 05:10

Gjerdingen