# Wires command of the Equinox Console Shell for debugging how bundles are wired

**URL:** <https://bnd.discourse.group/t/wires-command-of-the-equinox-console-shell-for-debugging-how-bundles-are-wired/499>\
**Category:** TIPS\
**Created:** [February 20, 2025, 11:33am UTC](https://bnd.discourse.group/t/wires-command-of-the-equinox-console-shell-for-debugging-how-bundles-are-wired/499 "2025-02-20T11:33:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [February 20, 2025, 11:33am UTC](https://bnd.discourse.group/t/wires-command-of-the-equinox-console-shell-for-debugging-how-bundles-are-wired/499/1 "2025-02-20T11:33:15Z")

</div>

There is a very useful command called `wires` in the Equinox Console, which can help debugging OSGi applications. Especially when you want to “see” (with your eyes) how Bundle A is wired to other bundles and why. The problem is that this command is very hard to find on in search engines, because it probably is undocumented. This is an attempt to change this 🙂

**Requirements:**

- Documentation wires command: [wires [bundleID] | Eclipse Equinox Documentation](https://equinox.eclipseprojects.io/commands/wires.html)
- Documentation Equinox Console Shell: [Help - Eclipse Platform](https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm)
- Maven: [https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.equinox.console](https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.equinox.console)
- `wires` command at Github: [equinox/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/WireCommand.java at ac75ce248e29b36ef8fd9e94e38869de3043907f · eclipse-equinox/equinox · GitHub](https://github.com/eclipse-equinox/equinox/blob/ac75ce248e29b36ef8fd9e94e38869de3043907f/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/WireCommand.java#L50)

## Example

The following shows the wiring of the **Gson** bundle in an application.

- Start your app
- The bundle for equinox console should be started

```auto
-runbundles: \
    org.eclipse.equinox.console;version='[1.4.800,1.4.801)',\

```

Example commands on the equinox console.

```auto
help

wires - Prints information about the wiring of a particular bundle
   scope: wiring
   parameters:
      long   

lb gson
START LEVEL 1
   ID|State |Level|Name
   18|Active | 1|Gson (2.10.1)|2.10.1

g! wires 18
Bundle com.google.gson 2.10.1:
is wired to:
	 - org.eclipse.osgi 3.21.0.v20240717-2103
	   - because of Import-Package: sun.misc; resolution:="optional"
	   - because of Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
	   - because of Require-Capability: osgi.ee; filter:="(|(&(osgi.ee=JavaSE)(version=1.7))(&(osgi.ee=JavaSE)(version=1.8)))"
and is consumed by:
	 - com.myapp.services 1.0.0
	   - because it Import-Package: com.google.gson; version="[2.10.0,3.0.0)"
	   - because it Import-Package: com.google.gson.reflect; version="[2.10.0,3.0.0)"
	 - com.myapp.foo 1.0.0.SNAPSHOT
	   - because it Import-Package: com.google.gson; version="2.10.1"
	 - com.myapp.bar.uitest.lib 1.0.0
	   - because it Import-Package: com.google.gson
	 - com.myapp.utils.csvconverter 1.0.0.202502201107
	   - because it Import-Package: com.google.gson; version="[2.10.0,3.0.0)"
	 - com.myapp.wrappers.3rdparty.google 1.0.0.SNAPSHOT
	   - because it Import-Package: com.google.gson.stream
	 - com.myapp.wrappers.com.ebay.oauth.client 1.10.0
	   - because it Import-Package: com.google.gson; resolution:="optional"
	   - because it Import-Package: com.google.gson.annotations; resolution:="optional"
	 - com.myapp.wrappers.com.paypal.sdk 2.5.106
	   - because it Import-Package: com.google.gson
	 - stripe-java 22.8.0
	   - because it Import-Package: com.google.gson; version="[2.10.0,3.0.0)"
	   - because it Import-Package: com.google.gson.annotations; version="[2.10.0,3.0.0)"
	   - because it Import-Package: com.google.gson.reflect; version="[2.10.0,3.0.0)"
	   - because it Import-Package: com.google.gson.stream; version="[2.10.0,3.0.0)"

```

You see a list of bundles which consume Bundle `com.google.gson 2.10.1` and also why.
