Skip to content

Cannot kill debug client #110

Description

@wataash

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions