Debug plug-in in eclipse - eclipse

I am trying to create a debug plug-in in eclipse. I need to get the exceptions thrown by the currently run program. Can anyone please help me to achieve this. The requirement is to get the entire exceptions, ie, the entire stack trace string. The problem currently is that the program already run contains errors and the exception may or may not be caught using try catch handlers. ie,the program containing error is out of our control. We need to extract the error caused by the already run program inside the plug in code. Can anyone give some suggestions.

Related

AngularJS: How do I force Chrome's Dev Console to show me which instruction caused the error?

I very often get error from angular.js, googleapi etc. like "undefined is not a function".
The problem is that I can't figure out how to find the instruction (written by me) who caused the error.
Normally I can use the debugger but there is a huge stack of calls and it's very difficult/long to find the original problem.
This is even more difficult while working with Google API's minified js.
Any clue?
Thanks in advance
In the debugger use breakpoint, or put it in your code with :
debugger;
If the console is up, the code will stop, helping you to do step by step process.
More info : https://developer.chrome.com/devtools/docs/javascript-debugging
Also maybe, you will have more info with a dev version of chrome https://www.google.fr/chrome/browser/canary.html
In the Sources Inspector of the Chrome DevTools you can press the Pause button (the one on the far right). This will cause the code to stop prior to the exception and maybe this can help you identify the cause of the problem, since you can inspect the scope variables and use the Console to further investigate the call stack.

Process files crash unexpectedly

I am working on a project in Drools6. I have defined a few custom tasks using workitemhandler. When I create a new process file(*.bpmn file) and model it by adding my custom tasks and other inbuilt blocks, everything works fine in the beginning. But, if the complexity of the .bpmn flow diagram increase i.e, I add about 4-5 custom tasks, create sub-processes, add a few gateways etc, the program crashes and I will not be able to open my flow diagram again. It says there is a parse error.
I have tried reinstalling eclipse, but it still gives me the same error. I have not used exception handling in the java class of my custom tasks. Could this be why my program is crashing.
please guys, if anyone has come across a similar issue, let me know how you resolved it.
Thank you
it seems that for some reason your business process is corrupted and it cannot be opened by the editor. Do you have a previous version of your process? Try opening another process.
You can also try the web designer, which is usually more powerful than the eclipse one.
Regards

Blocked recursive attempt to activate part

I am using JasperReports 5.2.0 in Eclipse Kepler 20130606-0932. I am using Java 1.7. I cannot find many other pages reporting this outside of using JSF or something code like. I am just using the GUI and am wondering why this is happening. This error happens whenever I go from a jrxml tab to any other tab. It does not occur when I go from a different tab to a jrxml tab. I don't want to post the entire dump unless someone really wants to see it. Here are the first few lines of the stack trace though
Blocked recursive attempt to activate part
java.lang.IllegalStateException
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2.setFocus(ContributedPartRenderer.java:119)
at org.eclipse.swt.custom.CTabItem.setFocus(CTabItem.java:329)
at org.eclipse.swt.custom.CTabFolder.setFocus(CTabFolder.java:2509)
at org.eclipse.swt.widgets.Control.fixFocus(Control.java:1053)
at org.eclipse.swt.widgets.Control.setVisible(Control.java:3819)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3049)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3006)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1101)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
Is there something I can try to resolve this error. I already re-installed Eclipse and created a new Jasper project. Still the same error every single time I tab.

eclipse - class find editor - source not find

I have a problem with eclipse debugging. I had a proper working code and few hours ago I add one more external library to do something new. When I run the program now it works properly, but when I want to debug it, it stopped on the first line of a new part of the code (the one using the newest external library). It shows the info:
"Class File Editor
Source not found
The source attachment does not contain the source for the file ModelBuilder.class"
When I try to step over I just receive the same information but connected with other files. After stepping over a multiple times I finally get back to my code and can debug the rest of the program normally.
Of course I can do it always but does anybody know the solution to that problem, not to click step over multiple times but debug normally?
It should not enter the external library code unless you step into it, or there's an exception in that code. If you find yourself stepping through code you don't have source to, use Step Return, which jumps to the end of whatever method you're in.
If it is caused by an exception in the library code and you want to ignore it, go to Window > Preferences > Java > Debug and uncheck "Suspend execution on uncaught exceptions".
If you know what exception is causing the execution to suspend, then you could also try this:
Go to the Debug perspective
Open the Breakpoints view
Click the J with the exclamation point by it (J!)
Search for the exception that triggers the debug suspend
Uncheck the two check boxes
Say OK

iPhone - Debugging EXC_BAD_ACCESS crashes

From times to times, while debugging an Application, I see this error on Xcode:
Program received signal: “EXC_BAD_ACCESS”.
and the debugger does not stop on the problematic line. In fact the debugger just shows me a page with a bunch assembly language code and that's it.
I have to have paranormal powers to figure out where the exact problem is.
Is there a way to force Xcode to give me more "nutritive" error messages – that can detail the problem – and stop on the offending line when such errors occur?
thanks for any help.
When the crash happens, open the Debugger in Xcode (Run -> Debugger). There should be 3 to 4 panes like this:
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeDebugging/art/debugger_disassembly.jpg
On the top-left pane (the "stack trace"), select the topmost row which is not gray.
(Note: Sometimes the stack trace can only find internal functions because of bad memory management triggered in the run loop. Try to Build -> Build and Analyze to eliminate all potential memory management bugs first.)
You can enable NSZombies see here and I've found a good way to see where the actual problem is, is to run and debug the program with the debugger open.
This way when the program stops executing it more often then shows the line that was executing when the program crashed.
I wrote up a blog that tells you how to use some compiler switches that help a lot in finding crashes that are the result of releasing objects before you are done with them.
http://loufranco.com/blog/files/debugging-memory-iphone.html
Build and Analyze is ok, but not as good as scan-build (which it is based on). Instructions for installing that are here:
http://loufranco.com/blog/files/scan-build-better-than-build-analyze.html