I can start portal and inspect values as expected. But my portal tool doesn't include viewers such as Exception viewer or class viewer as different from the demo video.
I checked the source code of the portal and the jar distribution file. The source code contains a namespace called portal.ui.viewer
. This namespace is missing from the portal's jar distribution. Are those viewers included into some other jar file? How can I employ those viewers?
My deps.edn has the following alias
:inspect/portal-cli
{:extra-deps {djblue/portal {:mvn/version "0.15.1"}
cheshire/cheshire {:mvn/version "5.10.0"} ; json
clj-commons/clj-yaml {:mvn/version "0.7.0"} ; yaml
,}}
I start portal using:
clojure -M:inspect/portal-cli
My user.clj includes:
(ns user
(:require [portal.api :as p]))
(def portal (p/open))
(p/tap)
After repl starts, I run the following commands:
(tap> {::exception (try (/ 1 0) (catch Exception e e))})
Here are the results:
According to the demo video, I am supposed to see portal.viewer/ex
as a viewer option. Then the stack trace would be listed in the proper format as here:
The viewer is available, but the exception needs to be data-fied first. Portal use to automatically datafy values but this behavior was problematic when I wanted access to the original object. You can datafy any selected value within the portal ui via the command palette (cmd + shift + p or ctrl + j).