ProductPromotion
Logo

Clojure

made by https://0x3d.site

GitHub - clojure/tools.trace: 1.3 update of clojure.contrib.trace
1.3 update of clojure.contrib.trace. Contribute to clojure/tools.trace development by creating an account on GitHub.
Visit Site

GitHub - clojure/tools.trace: 1.3 update of clojure.contrib.trace

GitHub - clojure/tools.trace: 1.3 update of clojure.contrib.trace

clojure.tools.trace

A Clojure trace tool. Defines tracing macros/fns to help you see what your code is doing.

Formerly known as clojure.contrib.trace.

See the tools.trace API Reference.

Releases and Dependency Information

Latest stable release: 0.8.0

CLI/deps.edn dependency information:

org.clojure/tools.trace {:mvn/version "0.8.0"}

Leiningen dependency information:

    [org.clojure/tools.trace "0.8.0"]

Maven dependency information:

    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>tools.trace</artifactId>
      <version>0.8.0</version>
    </dependency>

Example Usage

=> (use 'clojure.tools.trace)

=> (trace (* 2 3)) ;; To trace a value
TRACE: 6
6

=> (trace "tag" (* 2 3)) ;; To trace a value and assign a trace tag
TRACE tag: 6
6

=> (deftrace fubar [x v] (+ x v)) ;; To trace a function call and its return value
=> (fubar 2 3)
TRACE t1107: (fubar 2 3)
TRACE t1107: => 5
5

=> (do (+ 1 3) (* 5 6) (/ 1 0))
ArithmeticException Divide by zero  clojure.lang.Numbers.divide (Numbers.java:156)
=> (trace-forms (+ 1 3) (* 5 6) (/ 1 0)) ;; To identify which form is failing
ArithmeticException Divide by zero
  Form failed: (/ 1 0)
  clojure.lang.Numbers.divide (Numbers.java:156)

(trace-ns myown.namespace) ;; To dynamically trace/untrace all fns in a name space (untrace-ns myown.namespace)

(trace-vars myown.namespace/fubar) ;; To dynamically trace/untrace specific fns (untrace-vars myown.namespace/fubar)
 

Developer Information

Change Log

  • Release 0.8.0 Feb 19, 2024:
    • Update parent pom version
  • Release 0.7.11 Feb 11, 2021:
    • Fixed reflection warnings with type hints
  • Release 0.7.10 September 23, 2018:
    • Closed TTRACE-16, applied fix from Andy Fingerhut, fixed typos in README, support Clojure 1.9, fixes to unit tests
    • Closed TTRACE-13, trace-ns macro accept both quoted or unquoted namespace argument
  • Release 0.7.9 October 8, 2015:
    • Closed TTRACE-11, trace-vars/untrace-vars now accept vars
    • Closed TTRACE-12, move away from Java 5, extend some new throwables with ThrowableRecompose
    • Added more tests for TTRACE-12
  • Release 0.7.8 March 15, 2013:
    • Fixed README
  • Release 0.7.7 March 14, 2013:
    • Replaced def by declare in deftrace macro
    • Remove unnecessary call to run-tests in test suite
    • Trace only functions in trace-vars*
    • Added missing cond in clone-throwable on a Throwable
    • Do not allow trace-vars* to reapply tracing on an already traced function
  • Release 0.7.6 Aug 23, 2013:
    • Fixed crash of throwable tracing when no string based constructor exists
  • Release 0.7.5 Dec 1, 2012:
    • Fixed README and comments in source file
  • Release 0.7.4 Dec 1, 2012:
    • added traced? and traceable/ fns
    • removed reflection warnings
  • Release 0.7.3 March 4, 2012:
    • added macro wrappers around fns allowing dynamic tracing.
  • Release 0.7.2 Feb. 20, 2012:
    • added contribution from Michał Marczyk and Don Jackson to allow dynamic tracing of fn vars and all fns in a given namespace.
  • Release 0.7.1 on 2011-09-18
    • moved it to new contrib modular struct
    • made it 1.2/1.3 compliant
    • supported doc strings
    • added a trace-form macro, from Jonathan Fischer
  • Changes from clojure.trace
    • replaced trace-out with tracer
    • made trace a function instead of a macro (suggestion from Stuart Halloway)
    • added trace-fn-call

Copyright and License

Copyright (c) Stuart Sierra, Michel Salim, Luc Préfontaine, Jonathan Fischer Friberg, Michał Marczyk, Andy Fingerhut. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (https://opensource.org/license/epl-1-0/) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory