Skip to content

inspector: introduced --inspect-store option

This option takes folder name as argument. When it is passed, inspector will dump content of /json/list endpoint to file with random name inside of passed folder, inspector will try to cleanup this file as well at finish but without strict guarantees.

This option is useful when we need to have node targets discovery with child processes or without child processes. Current solution is setting --inspect-brk=0 using environment to force each node process to open inspector socket and listenning for stderr for started process. This approach has a lot of flows, e.g. it requires stderr parsing, it does not help with discovering node processes which are started independently.

With new flag if we need to discover and debug node processes using inspector:

  1. create folder ahead of time,
  2. pass this folder with new --inspect-store flag with --inspect-brk=0 or --inspect=0 using environment,
  3. listen to files created inside this folder using any external tool, e.g. another nodes script with fs.watch.
  4. as soon as new file created - try to connect,
  5. be ready for stale store files,
  6. remove store folder later.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading