8 votes

Inspect

If you're writing Razor views without Visual Studio Intellisense to help you navigate the .Net framework, this one is for you...

Inspect displays the public members (properties, methods etc.) of any .Net object. You can even invoke these members directly in your browser and inspect the result. This essentially allows you to navigate through the object structure and experiment with various chains of invocations.

For Umbraco content, Inspect also displays the Umbraco properties and makes a brave attempt at cross linking between content items (e.g. if you've selected a content item with a content picker, Inspect will render a link to inspect the selected content item).

The usage is simple. Once the package is installed, simply call @Inspect.Entity([your .Net object here]) somewhere in your view (preferably at the top, right after the body tag) - e.g. @Inspect.Entity(Model). The only requirement is that you've included jQuery on your page.

The package also installs an alternative template called "Inspect", which lets you inspect the current Umbraco content element anywhere on your site, simply by adding "/inspect" to your current URL.

For safety reasons, Inspect will only work if you're making a request to your localhost (during development) or if your IP is registered as "allowed" in /Config/Inspect.config.

Pro tip:
Everything in .Net is an object. If you to know which methods are available for string manipulation, try calling @Inspect.Entity("Hello world") in your view. Or if you're curious as to which methods the Umbraco helper provides you with, try calling @Inspect.Entity(Umbraco).

Please note that there are different packages for Umbraco 7.1.x, 6.2.x and 6.1.x - the packages are named for their respective target Umbraco versions.

Package owner

Kenn Jacobsen

Kenn Jacobsen

Kenn has 791 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions: 7.1.x

Package Information

  • Package owner: Kenn Jacobsen
  • Created: 04/05/2014
  • Current version 1.0.1.4
  • License MIT
  • Downloads on Our: 2.8K