Category: Java/.NET Runtime


How can I debug the .NET parts of my mixed Java/.NET application?


You can debug the application using any .NET debugger. Obviously, a standard .NET debugger will only allow you to step through the .NET parts of your application (see another FAQ for information on debugging the Java parts of your application).

In debugging your application, you might have to look at some proxy object internals that you would normally never look at. Here are some guidelines for helping you interpret what you are seeing:

  • Proxy objects are just a thin wrapper around Java objects.
    Each proxy object maintains a "handle" representing the Java object. You can inspect the value of that handle by looking at the JObject property.
  • Normally, there are no proxy instances that contain a null handle (null on the Java side is represented as null on the .NET side), but you could conceivably have a .NET proxy object with a value of 0 for JObject. This would be a null reference.
  • You cannot observe the values of Java fields directly in the .NET debugger because they are resolved dynamically upon usage.
  • Two proxy objects can represent the same Java object even if they have different values for the JObject "handle."

Copyright 2006-2011 by Codemesh, Inc., ALL RIGHTS RESERVED

frequently asked questions
home products support customers partners newsroom about us contact us