Fork me on GitHub
#shadow-cljs
<
2022-12-06
>
wcalderipe09:12:40

Hey folks, I'm wondering how I can debug the input and output of the nREPL?

thheller09:12:15

there is a little helper I wrote for that

๐Ÿ™ 1
thheller09:12:11

npx shadow-cljs run shadow.nrepl-debug 6001 6000

wcalderipe09:12:25

Thanks a lot

thheller09:12:35

this forwards all traffic from tcp port 6001 to 6000

thheller09:12:44

so assuming your regular nrepl server is running on 6000

thheller09:12:52

you connect your client to 6001 instead

๐Ÿ‘ 1
thheller09:12:34

writes all sent packets to target/nrepl-debug dir

thheller09:12:40

just a log file of edn packets

thheller09:12:58

depending on the chattiness of your client that can get pretty large

thheller09:12:38

you can also run it with leiningen or clj

thheller09:12:54

clj -M -m shadow.nrepl-debug 6001 600 (with shadow-cljs as added dependency)

thheller09:12:00

lein run -m shadow.nrepl-debug ... (same)

thheller09:12:33

a dumb little helper to just get some log of what actually went over the wire

wcalderipe09:12:21

It'll do the job. Thanks again!

Valentin Mouret12:12:42

Hello ๐Ÿ™‚ I am facing a weird situation and I can only pinpoint it to the shadow/re-frame interaction. The same application works fine in dev, but it looks like subs are broken on production (`release`). Is there something I am missing like a require somewhere? Edit: solved Problem between the keyboard and the chair.

โœ… 1
Valentin Mouret12:12:53

dev/release difference sounds like the closure compiler doing something funky, but event/subs are only about emitting namespaced keywords, so I donโ€™t know what could be wrong here. My view is essentially receiving nil from a sub in release, but it works fine in watch mode.

Valentin Mouret12:12:20

Events look alright.