Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot kill debug client #110

Open
wataash opened this issue Nov 18, 2022 · 1 comment
Open

Cannot kill debug client #110

wataash opened this issue Nov 18, 2022 · 1 comment

Comments

@wataash
Copy link

wataash commented Nov 18, 2022

When this package is used, we can't exit node --inspect[-*] debug server with ctrl-C, or kill it with SIGTERM. This is due to tapjs/signal-exit#71.

1$ # terminal 1: debug server
1$ cat index.js  # very simple script
console.log("a");

1$ node --inspect-brk index.js

2$ # terminal 2: debug client
2$ node inspect --port=9229
connecting to 127.0.0.1:9229 ... ok
Break on start in index.js:1
> 1 console.log("a");
  2 
debug> 

# terminal1
Debugger attached.
^C
1$ # killed with Ctrl-C

When proper-lockfile is used:

1$ cat index.js
const lockfile = require("proper-lockfile");
console.log("a");

1$ node --inspect-brk index.js

2$ node inspect --port=9229
connecting to 127.0.0.1:9229 ... ok
Break on start in index.js:1
> 1 const lockfile = require("proper-lockfile");
  2 console.log("a");
  3 
debug> n
break in index.js:2
  1 const lockfile = require("proper-lockfile");
> 2 console.log("a");
  3 

# now we can't kill the server!

# terminal1
Debugger attached.
^C^C^C^C^C

Tested environment:

  • Ubuntu 20.04 amd64
  • Linux kernel 5.15.39+
  • Node.js v16.18.1
@wataash
Copy link
Author

wataash commented Nov 18, 2022

I think we should wait for tapjs/signal-exit#71 to be responded in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant