question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a debug option

See original GitHub issue

Feature Request

Is your feature request related to a problem? Please describe. I’m trying to debug my probot application using node --inspect-brk=<port> ./node_modules/.bin/probot run ./index.js so I can debug it, but I keep getting the same error:

Debugger listening on ws://127.0.0.1:36149/18493de3-209f-4b8e-af61-58745c77a878
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Starting inspector on 127.0.0.1:36149 failed: address already in use
Waiting for the debugger to disconnect...
Killed: 9

Even though nothing else is running, so the port is not already in use (tried multiple ports)

Describe the solution you’d like Documentation on how to debug, or a command line flag can be of great help here.

Describe alternatives you’ve considered I can run a debugger when running the jest tests, so that’s an option atm. but I would prefer to have a legitimate option to run the app and debug it while using real webhooks from GitHub.

Teachability, Documentation, Adoption, Migration Strategy Either make the default node method work:

node --inspect-brk=<port> ./node_modules/.bin/probot run ./index.js

or add a flag for running the bot:

npx probot run ./index.js --debug=33444

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Thatkookooguycommented, Jan 12, 2019

@JasonEtco did you try and attach a breakpoint in your index.js file?

I can enter the probot code itself in debug mode with the line you wrote, but I can’t debug index.js since when the program’s process is opened, the child process tries to use the same port address. This fails because the probot process debugger already runs on the port selected, and the child process can’t attach a new debugger on the same port.

That’s why I think it’s related to the issue I linked in my first comment.

1reaction
mweblercommented, Feb 15, 2019

I just stepped into the same issue and the workaround mentioned here worked for me. Use --inspect=0 option then connect to the second debugger port, which should be linked to probot process:

screen shot 2019-02-15 at 12 35 20 pm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Options (Using the GNU Compiler Collection (GCC))
3.10 Options for Debugging Your Program · -g. Produce debugging information in the operating system's native format (stabs, COFF, XCOFF, or DWARF). ·...
Read more >
General debugging options - Visual Studio - Microsoft Learn
To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options....
Read more >
Configure on-device developer options - Android Developers
The Settings app on Android includes a screen called Developer options that lets you configure system behaviors that help you profile and debug...
Read more >
How to add a DEBUG mode for your Python Logging Mid-Run
A way to change features midway through our application of logging across all modules, whether this is logging level, handlers, configuration ...
Read more >
Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, ... Choose Add Configuration option in the Run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found