Debugging NodeBB
-
Are there instructions somewhere on debugging nodeBB? I assume that @ben_lubar and @boomzilla don't just blindly work on code. I'd like to be able to step through stuff.
I posted a topic over @ nodebb forums, but didn't get any responses yet.
-
Eep, sorry about that. I don't check the NodeBB forum as often as I should.
You can run NodeBB in dev mode with
./nodebb dev
, orgrunt
if you want to make changes without having to restart NodeBB by hand.Logs are kept in
logs/output.log
unless you're in dev mode in which case they're output to stdout.
-
@julianlam said in Debugging NodeBB:
Eep, sorry about that. I don't check the NodeBB forum as often as I should.
You can run NodeBB in dev mode with
./nodebb dev
, orgrunt
if you want to make changes without having to restart NodeBB by hand.Logs are kept in
logs/output.log
unless you're in dev mode in which case they're output to stdout.Thanks Julian. That's not quite what I'm looking for, though. I want a step debugger, and from what I understand WebStorm is one of the IDEs that can give that to me. Unfortunately, I can't seem to get it to work.
-
@dangeruss is there a reason you can't use the step debugger in Node.js?
-
@polygeekery said in Debugging NodeBB:
@dangeruss is there a reason you can't use the step debugger in Node.js?
OP seems to indicate he doesn't know how, lacking sufficient hints and pointers to accomplish that task.
-
@tsaukpaetra Ahhhhhhhh! Got it. Thank you Mr. Obvious for pointing out that to me Mr. Doesn't Get The Obvious.
I really can be dense sometimes. No sarcasm was meant there. Or...well...sarcasm was meant but it was directed at myself.
-
@polygeekery said in Debugging NodeBB:
@tsaukpaetra Ahhhhhhhh! Got it. Thank you Mr. Obvious for pointing out that to me Mr. Doesn't Get The Obvious.
I really can be dense sometimes. No sarcasm was meant there. Or...well...sarcasm was meant but it was directed at myself.
To be fair, this forum is extremely good at making the distinction clear in most topics.
Rest assured that topics in the General Help and subcategories are intended for legitimate requests for assistance and not for humorous discourse. Mostly. At least, less likely. Probably.
-
If you're getting an error about a port already being in use, try starting the
app.js
file directly instead of letting it be forked byloader.js
which is forked bynodebb
.Edit: You'll need to have a single port in the config instead of an array of ports for that to work, but you probably already have it set up that way unless you modified the config manually.
-
@ben_lubar said in Debugging NodeBB:
If you're getting an error about a port already being in use, try starting the
app.js
file directly instead of letting it be forked byloader.js
which is forked bynodebb
.Edit: You'll need to have a single port in the config instead of an array of ports for that to work, but you probably already have it set up that way unless you modified the config manually.
Thank you, that was the missing piece. I've read somewhere about nodebb forking things, but made the noob mistake of running nodebb instead of app.js anyway.
Looks like things are working now with step debugging. Now to actually get some time to sit down and figure out wtf it's doing.
-
@dangeruss said in Debugging NodeBB:
to sit down and figure out wtf it's doing.
Great! Let us know when you figure it out too. We're all stumped on our end.
-
@julianlam said in Debugging NodeBB:
@dangeruss said in Debugging NodeBB:
to sit down and figure out wtf it's doing.
Great! Let us know when you figure it out too. We're all stumped on our end.
:-)
-
Do you guys know why my breakpoints within plugins are not being hit?
-
@julianlam said in Debugging NodeBB:
Eep, sorry about that. I don't check the NodeBB forum as often as I should.
Well, that’s… ironic as hell.