Skip to content

Instantly share code, notes, and snippets.

@rksm
Last active July 27, 2019 07:10
Show Gist options
  • Save rksm/ac0e66b1bb69de76bdf5ebba08cffe9c to your computer and use it in GitHub Desktop.
Save rksm/ac0e66b1bb69de76bdf5ebba08cffe9c to your computer and use it in GitHub Desktop.
trace figwheel start
;; clj -R:figwheel -Sdeps '{:deps {org.clojure/tools.trace {:mvn/version "0.7.10"}}}' -i trace_cljs_repl_start.clj -m figwheel.main -b dev -r
(ns user)
(require '[clojure.tools.trace :as t])
(require 'cljs.main)
(require 'cljs.repl)
(require 'figwheel.main)
(require 'figwheel.repl)
(require 'figwheel.core)
(t/trace-vars figwheel.repl/connections-available)
(t/trace-vars figwheel.repl/create-connection!)
(t/trace-vars figwheel.repl/receive-message!)
(t/trace-vars cljs.repl/maybe-install-npm-deps)
(t/trace-vars cljs.repl/load-namespace)
(t/trace-vars cljs.repl/run-inits)
(t/trace-vars cljs.repl/initial-prompt)
(t/trace-vars cljs.repl/repl-prompt)
(t/trace-vars cljs.repl/repl-read)
(t/trace-vars cljs.repl/repl*)
(set! *print-level* 1)
(set! *print-length* 3)
@rksm
Copy link
Author

rksm commented Jul 27, 2019

TRACE t9211: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9211: | => ()
TRACE t9262: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9262: | => ()

... opening http://localhost:9500/, connection happens here ...

TRACE t9263: (figwheel.repl/create-connection! {:port 9500, :headers {:sec-websocket-ver
TRACE t9263: => {:close-fn #object[figwheel.server.jetty_websocket$websocket_connection_
TRACE t9264: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9264: | => (#)
TRACE t9265: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9265: | => (#)
TRACE t9266: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9266: => nil
TRACE t9267: | (cljs.repl/maybe-install-npm-deps #)
TRACE t9267: | => nil
TRACE t9528: | (cljs.repl/load-namespace #figwheel.repl.FigwheelReplEnv# cljs.pprint ...
TRACE t9529: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9529: | | => (#)
TRACE t9530: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9530: | | => (#)
TRACE t9531: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9531: => nil
TRACE t9528: | => (#cljs.closure.JavaScriptFile# #cljs.closure.JavaScriptFile# #cljs.clo
TRACE t9532: | (cljs.repl/load-namespace #figwheel.repl.FigwheelReplEnv# figwheel.repl .
TRACE t9533: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9533: | | => (#)
TRACE t9534: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9534: | | => (#)
TRACE t9535: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9535: => nil
TRACE t9532: | => (#cljs.closure.JavaScriptFile# #cljs.closure.JavaScriptFile# #cljs.clo
TRACE t9536: | (cljs.repl/load-namespace #figwheel.repl.FigwheelReplEnv# figwheel.main .
TRACE t9537: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9537: | | => (#)
TRACE t9538: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9538: | | => (#)
TRACE t9539: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9539: => nil
TRACE t9536: | => (#cljs.closure.JavaScriptFile# #cljs.closure.JavaScriptFile# #cljs.clo
TRACE t9540: | (cljs.repl/load-namespace #figwheel.repl.FigwheelReplEnv# cljs.repl ...)
TRACE t9541: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9541: | | => (#)
TRACE t9542: | | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9542: | | => (#)
TRACE t9543: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9543: => nil
TRACE t9540: | => (#cljs.closure.JavaScriptFile# #cljs.closure.JavaScriptFile# #cljs.clo
TRACE t9544: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9544: | => (#)
TRACE t9545: | (figwheel.repl/connections-available #figwheel.repl.FigwheelReplEnv#)
TRACE t9545: | => (#)
TRACE t9546: (figwheel.repl/receive-message! "{:session-id \"2cb64999-ff4c-4b8d-a66a-c95
TRACE t9546: => nil
TRACE t9547: | (cljs.repl/run-inits #figwheel.repl.FigwheelReplEnv# #)
TRACE t9547: | => nil
TRACE t9548: | (cljs.repl/initial-prompt #object[cljs.repl$repl_title 0x19b0f61c "cljs.r
ClojureScript 1.10.520
TRACE t9549: | | (cljs.repl/repl-prompt)
cljs.user=>
TRACE t9549: | | => nil
TRACE t9548: | => nil
TRACE t9550: | (cljs.repl/repl-read #object[java.lang.Object 0x33e2808e "java.lang.Objec
TRACE t9551: | | (cljs.repl/repl-read #object[java.lang.Object 0x33e2808e "java.lang.Obj

@dimovich
Copy link

With :open-url commented out, the process stops after figwheel.repl/create-connection!

TRACE t12509: (figwheel.repl/create-connection! {:port 9500, :headers {:sec-websocket-version "13", :sec-websocket-extensions "permessage-deflate; client_max_window_bits", :user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36", :pragma "no-cache", :sec-websocket-key "DHlDrH8oG9luYhCGfAcMNQ==", :upgrade "websocket", :cache-control "no-cache", :host "localhost:9500", :accept-encoding "gzip, deflate, br", :origin "http://localhost:9500", :connection "Upgrade", :accept-language "en-US,en;q=0.9"}, :host "localhost", :websocket? true, :origin "http://localhost:9500", :uri "/figwheel-connect", :query-string "fwprocess=6b0421&fwbuild=dev&fwsid=83282c9d-886e-47c7-aa42-390264e34404&fwsname=Shawn", :scheme "ws", :request-method :get} {:type :websocket, :is-open-fn #object[figwheel.server.jetty_websocket$websocket_connection_data$fn__3792 0x4595d15c "figwheel.server.jetty_websocket$websocket_connection_data$fn__3792@4595d15c"], :close-fn #object[figwheel.server.jetty_websocket$websocket_connection_data$fn__3790 0x15ff2af9 "figwheel.server.jetty_websocket$websocket_connection_data$fn__3790@15ff2af9"], :send-fn #object[figwheel.repl$abstract_websocket_connection$fn__3915$fn__3917 0x7c86f1b "figwheel.repl$abstract_websocket_connection$fn__3915$fn__3917@7c86f1b"]})
TRACE t12509: => {:close-fn #object[figwheel.server.jetty_websocket$websocket_connection_data$fn__3790 0x15ff2af9 "figwheel.server.jetty_websocket$websocket_connection_data$fn__3790@15ff2af9"], :session-id "83282c9d-886e-47c7-aa42-390264e34404", :session-name "Shawn", :type :websocket, :is-open-fn #object[figwheel.server.jetty_websocket$websocket_connection_data$fn__3792 0x4595d15c "figwheel.server.jetty_websocket$websocket_connection_data$fn__3792@4595d15c"], :send-fn #object[figwheel.repl$abstract_websocket_connection$fn__3915$fn__3917 0x7c86f1b "figwheel.repl$abstract_websocket_connection$fn__3915$fn__3917@7c86f1b"], :uri "/figwheel-connect", :query {:fwprocess "6b0421", :fwbuild "dev", :fwsid "83282c9d-886e-47c7-aa42-390264e34404", :fwsname "Shawn"}, :query-string "fwprocess=6b0421&fwbuild=dev&fwsid=83282c9d-886e-47c7-aa42-390264e34404&fwsname=Shawn", :created-at 1564211116760, :scheme "ws", :request-method :get, :figwheel.repl/alive-at 1564211116760}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment