How can I figure out what didn't load in MEF - mef

I had a class and I typed in the concrete class rather then the interface that was registered.
Is there a way to debug this sort of thing in visual studio?
I don't really want to use mefx because it seemed to crash on me when I tried it.

I think Daniel Plaisted's post on that topic covered it pretty well. If you don't like mefx, you can examine the rejection trace in the debugger's output window, or you can use the composition diagnostics assembly to print the composition information yourself.

Related

Eclipse custom breakpoint (execute a java method, do not halt)

I am looking to instrument a near-production application to simply print the stack trace when a variable is modified. I don't want to halt-thread or halt-VM.
What is a best and least complex approach?
Do I need to write my own plugin to handle 'DebugElement'?
Do I need to write a custom Debug Adapter?
Are there any examples out there? I know about EclipseCon2005_Tutorial21-v2 (Darin Wright, Bjorn Freeman-Benson) example for an Eclipse debug plugin contains deprecated code (e.g., "IPluginDescriptor").
I'm trying to follow Vogella's tutorial but some things are not clear enough.
Ah, just call a method from the conditional expression. It can do what is needed, and then "return false;" so that the VM is not suspended.

Is there a way to deobfuscate already obfuscated GWT javascript code, that was obfuscated by me?

I want to have a possibility to decode error stacktraces that appear in the production environment.
If you kept your symbolMap around, yes; e.g. check out
http://code.google.com/p/speedtracer/wiki/ResymbolizationProtocol
(disclaimer: never tried it, myself)
you need to use the JsEmulateStackTrace class. Its seemly very complex and have never really gotten around to implementing it fully myself.
http://code.google.com/p/google-web-toolkit/wiki/WebModeExceptions
this hypothetically remaps your symbol map for you, but honestly i doubt it works fully as i haven't seen a library/module yet that provides proper stack tracing for gwt. So that tells me its pretty hard or not fully working.
honestly it might be better to create some code to inject at compile time that provides stack trace support, that allows you to generate your own stack trace rather then using the actual java script stack trace. IE.. you might be able to create a single base class for all of your classes that you compile. With maybe an annotation or something. Then have your build script extend all of your classes pre compile so they are transparent to the dev, but included with the compiled cache file. You could have your base class grab the class name and or method name or something. and manage it with a simple stack that you can pop.

Is there a quick way to add all undefined methods?

Lately I've been using a lot of JUnit tests which have the predefined names for methods I will need to implement in my code. I find the "Create method 'x'" tool very useful but I was wondering if there was a tool that creates all the undefined methods, would anyone happen to know? This really isn't a huge problem but it would be very convenient for me to just add all of the missing methods at once as opposed to one by one.
I'm afraid that is not possible. Eclipse is able to generate all methods which you need to implement an interface, but you do not seem to have an interface here. If I understand your scenario right, you get Unit-Tests which do not compile because your class does not provide the tested methods yet.
When the class exists already, then Eclipse should suggest you to create a method with the needed signature. That is what you probably mean with "one by one".
In your case the fastest way is:
create the class
go into your unit test
jump through all non-compiling methods using command + . and create the methods using auto-suggest

GWT using UiBinder vs Pure Java

I'm starting a new gwt project, and I've decided to use UiBinder instead of pure java. I'm starting to regret this decision. In fact, I'm starting to think that maybe I should switch to pure java. But before that, I thought I post a question and get your feedback.
In my limited experience, UiBinder is all great, until something goes wrong. Then there is no indication of how to solve the problem. All I get from eclipse is "Failed to create an instance of vai deferred binding." Followed by a null pointer stacktrace. Not very useful. And if I want to figure out what's going on, I guess I'll have to figure out where the compiled is stored and scan through that...which defeats the point of having a compiler.
Am I missing a compiler option or something that would generate better error messages?
Thanks in advance.

How to run additional statements in eclipse(pdt for PHP)?

Like firebug's console,I can type in the scripts directly.
Is there a similar place in eclipse out there?
Or do I install some plugin to have the feature?
You can use the Display window to type in code snippets, set variable values and evaluate whilst debugging.
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/display/ref-display_view.htm
The "watch" view can be used to execute simple snippets of code.
In some circumstances, I use the groovy shell (in a separate window) to check how a code snippet will behave. It isn't practical when complex data structures or library classes are involved, but for a respectable number of cases it works very well.
You can use the Expression and Display views. There's a set of excellent free video tutorials on the Eclipse debugger that you can see here. The aforementioned views are talked about in lesson 3.