🚀 Getting Started
1️⃣ Install the package:
npm install --save livedebugger2️⃣ Enter and save your API Keys:
Required for private repositories or to avoid rate limits
3️⃣ Add the following to the top of server.js:
require('livedebugger').initializeLiveDebugger('API_KEY_HERE');4️⃣ Add a breakpoint from this UI, run your application, and start the log.
Sample Application
https://github.com/Amir-K/NodeLiveExample
The sample application's README provides step-by-step instructions on setting up your API key and running the application. For a complete experience, consider deploying it to a Node.js hosting provider to test live debugging on a remote server.
Setting Breakpoints
In the dashboard, add breakpoints by specifying the file name, line number, and (optionally) the column number (default: 1). If your Node.js application is compiled, refer to the next section. Once configured, start the logger—when execution reaches a breakpoint, the log will capture and display local scope variables.
Debugging Compiled/Minified Scripts
If your application is written in TypeScript or uses compiled/minified JavaScript, use the provided source mapping tool to determine the correct breakpoint locations in the compiled code. Run the following command from the same directory as your package.json (which includes livedebugger as a dependency):
npx ldfindsourceThe tool will prompt you for:
- The original file name
- The column number
- The absolute path to the folder containing sourcemaps