From the course: Building APIs with LoopBack

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Debugging

Debugging - Node.js Tutorial

From the course: Building APIs with LoopBack

Start my 1-month free trial

Debugging

- [Instructor] Eventually, probably sooner than later, you're going to run into an issue. You'll make a mistake, or maybe you'll encounter a bug in loopback itself, but you know it's going to happen. Things will break. Figuring out how to debug what's going wrong is an essential tool to getting you back on track and completing your application. First and foremost, do not forget that loopback is just another node application. That means you can debug via console.log if you want, and yeah, that's looked down on, but you know what, it works, or use a "real" debugger, for example, my preferred editor, visual studio code, has a node debugger baked in. Another interesting option is the use of debug strings, so what are they? Basically, a debug string is an environment variable you set that loopback will pick up on and use as a flag to say, "I should be more talkative about what I'm doing." By talkative, I mean logging related to what loopback is doing in terms of what you're debugging. To…

Contents