Breakpoints grouping and naming in eclipse and Visual Studio - eclipse

I work with large project having different modules, subprojects. When I am working with one module I need to create set of debugpoints/breakpoints to debug that module.
When I have to work with other one, to debug it, I have to create another set of breakpoints and disable the ones created to debug the earlier module.
When I want to debug (dont conclude that I write buggy code...its just that....it just happens :p) third module, I have to create thrid set of debug points, disable the earlier two sets corresponding to earlier two modules.
Same with debugging fourth module.
Same with debugging fifth module.
Now I want to come back to debugging first module. I have breakpoints related to all modules in my breakpoint window. Say 5 breakpoints corresponding to each module. Total 5*5 = 25. Now I have to go through reading each breakpoint checking which belongs to the first one, enabling them and disabling others.
Am I missing something. Is some simpler/standard way to ease this already there in eclipse.
I feel there should be say "Save set of breakpoints" option which note all the breakpoints currently in the breakpoint window as belonging to same set and will then ask us to give name to that set, say in my case "Module 1".
Then another option "Create new breakpoint set", which will clear up breakpoint window without deleting already created named breakpoint sets
Then, ofcourse the option to "Load breakpoint set" which will simply show up the set we saved as, say in dropdownlist. We select the named breakpoint set and it will end up loading those set of breakpoints.
Q. Am I overthinking? Is similar stuff already there? Also willing to know if similar stuff is there in Visual Studio too

Use 'Breakpoint Working Sets' for this.
In the Breakpoints view (in the Debug perspective) click the small triangle at the top right of the view and select the 'Working Sets...' menu item. This will let you manage the breakpoint working sets.
More details in the Eclipse help

Related

In Eclipse, Is there a way to disable a breakpoint temporarily?

I have a number of breakpoints scattered throughout my code. I don't want to lose them, I just want to temporarily turn them all off so that the breakpoint I just added is the only one that is triggered. In other words, to have "active" and "inactive" breakpoints. Is this possible in Eclipse? I'm running Neon, 4.6.3.
In the run menu, about halfway down - there's "Skip All Break Points" - or you can do CTRL+ALT+B
Just don't forget to toggle it back else you'll be wondering why none of your breakpoints are no longer working - been there, done that.
Note and update as you wanted to only disable specific breakpoints, but still have some or a new one enabled. Too accomplish this:
Window->Show View->Debug Tree Node Select "Breakpoints" - this opens a view with all of your breakpoints. Select all of them, select disable - now select just the one (or two) that you want!
If you mean Java breakpoints, yes, you can just right-click on them either in the Java Editor or in the Breakpoints View and turn them on and off at will. Support in other languages is dependent on the language.
http://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.user/reference/breakpoints/ref-enabled_option.htm?cp=1_4_0_1

eclipse: categorizing breakpoints in debugger

In a multimillion line project, sometimes when searching for a bug, you can end up creating several dozen breakpoints. Often these breakpoints are searching for slightly different things.
Eclipse displays the class, line number, and method in which the breakpoint lies, but that's not always enough for me to keep track of everything. Sometimes I will know that there are a couple of specific things I want to look at, and I'll have a set of breakpoints digging through each of them. It would be really useful to be able to create breakpoint categories to help me keep track of where everything I want to look at happens.
I'm wondering if there is a way to do this, either in stock eclipse, or with a plugin.
Found it.
In the breakpoints view, open the view menu and select Working Sets.... This will allow you to create categories. Once you create a new working set and select the breakpoints to include in it, you can open the view menu again and select Group By > Breakpoint Working Sets. This will group your breakpoints into categories.

Eclipse working sets -- how to rename them? Also, can the error-icon be disabled?

After mild frustration with the difficulty to make top-level "plain old folders" within Eclipse for visual-organization purposes, I discovered that the thing I'm after is called a "working set". Hooray! But they don't seem to be rename-able, by any of the apparent avenues (right-clicking on it or using the Configure Working Sets window).
Is that just the way things are, since no one should be so lazy as to refuse making a new working set with the right name and transferring everything over? Or am I missing something obvious?
I also have a more minor question whose answer I already think I know. Can I tell a specific working set not to change its icon to have the "red X" when one of its children has an error? Nothing in the preferences under Debugging suggests to me the ability to turn off the automatic icon-changing. It's a useful feature, but I have a few simple practice projects with very basic errors, and I don't need the visual reminder to "fix" them, especially if they're in my "Practice" working set, whose icon I'd prefer not to change.
To rename a Working Set, you need to get to the dialogue of selecting a Working Set (click on the white down arrow at the top right of the package explorer > Configure Working Sets..), focus on your Working Set and click the "Edit" button. There, you can change the Working Set's name, as well as what's actually included in the Working Set.
There is no way (that I know of) to change the icon display to avoid showing the errors marker.

Debugger / Profiler for Eclipse?

Is there any tutorial for debugging applications/ running profiler in eclipse? Please let me know thanks..
This will depend on what language you are using. How you setup for debugging PHP vs C++ is a little different as they use different underlying tools (PHP - Xdebug vs C++ - gdb)
In a general sense, you will configure the app much like you would set it up to run within Eclipse. In some cases you will have to be sure to enable debugging information within the code base for the debuggers to provide detailed information. From there you're looking at setting breakpoints, stepping, and setting up watches which is very similar language-to-language within the Debug Perspective in Eclipse.
A common scenario is to set a breakpoint within the codebase by clicking on the left bar in the editor, and selecting toggle breakpoint. Then click the debug button in the IDE and it should open the Debug Perspective and either break at the beginning of main, or will run to the breakpoint you set in the code. Once the break is hit, you will be able to browse the stack frames within one of the views within the perspective and you will see tabs for watches, breakpoints, etc. The buttons near the top that look similar to play, and then arrows jumping over dots are the way you control the execution from your breakpoint. If you click "step over" the code will go line by line in the source file you're in until it must goto another file to follow the execution of your code. It will not go into a function call, rather call it execute it and return to the next line in the current source. If you want to go into the function call and continue debugging from there, you would use the "step into" button which is right next to "step over" in most cases. Resume restarts regular execution and will run your program normally until the end or another breakpoint is hit.
Start from there and get comfortable with it and then start playing with things like conditional breakpoints and watches. Conditional breaks are exactly like breakpoints but they only stop execution if the condition you specify is met. With C++ this is usually done by right clicking on the breakpoint and providing the conditional expression where appropriate in the menu. (I forget the exact verbage)
Watches allow you to watch memory and have the program break when memory is read, written to, or both so you can inspect your application.
Some debuggers in Eclipse may lack some of these features or offer more advanced features than those listed above, but these concepts should get you well on your way.
Good luck!

What is a debug working set (Eclipse)?

I'm using Eclipse IDE and notice an option in the Debug perspective in the Breakpoints view that allows me to chose/create a working set. I've found all kinds of help online that tells me how to make a working set or choose a working set, but nothing that explains what a working set is or why I'd want to use one.
A working set is a subset of other objects. You can create a breakpoint working set that contains only some of your breakpoints, or a project working set that contains only part of your project, and so on. You would use working sets to let you easily switch back and forth between different parts of a project or workspace.