As I’m trying to get the hang of RedwoodJs, I’m often wanting to use console.log even in the /api folder, but those statements obviously don’t appear in the browser console.
Within API functions, how can I output what a variable’s value is at the moment?
In particular, I’m trying to debug why I’m unable to persist to the DB a new record in a joiner table (explicit many-to-many relation).
Thanks for your response. I hadn’t known what crabasa shared in that post, but that’s not what I was looking for.
I feel ridiculous: I eventually realized that the server-side console.log statements were outputting to my Git Bash terminal where I ran yarn rw dev. I don’t know how I didn’t notice them before. That’s what I was looking for. My question was probably too basic for you to know what I was asking.
And I finally bailed on explicit joiner tables (# 2 from First steps after tutorial), and it feels good to have at least the implicit version working.
I love seeing all of your posts… so positive and helpful!
@ryancwalsh it’s a pleasure! Thanks for taking notice and saying so
Also, your questions have helped add momentum to a topic I just posted (link below). Please add a comment if you have interest and/or suggestion about what would be helpful: