idea-run-typescript icon indicating copy to clipboard operation
idea-run-typescript copied to clipboard

[bug] unknown reason debug process start twice

Open bluelovers opened this issue 5 years ago • 7 comments

currently this bug only happen for me

https://github.com/bluelovers/idea-run-typescript/pull/14#issuecomment-678684547

https://github.com/bluelovers/idea-run-typescript/pull/14#issuecomment-678695824

https://github.com/bluelovers/idea-run-typescript/pull/14#issuecomment-678802907

bluelovers avatar Aug 23 '20 21:08 bluelovers

bug is by esm-ts-node

bluelovers avatar Aug 23 '20 22:08 bluelovers

How do you reproduce this? How to use esm-ts-node? Re-open this ticket, I'll try to help

Garethp avatar Aug 24 '20 09:08 Garethp

image

bluelovers avatar Aug 24 '20 16:08 bluelovers

Only run once for me, but debug not working

Garethp avatar Aug 24 '20 18:08 Garethp

I know what's wrong. Getting debug message twice is correct with esm-ts-node. Only runs once, but debug connects twice.

  1. Debug connects to main process
  2. esm-ts-node creates a child process
  3. Debug connects to child process.

One run, two messages

Garethp avatar Aug 24 '20 18:08 Garethp

looks like can't fix this by delete NODE_OPTIONS lol, it will make debug point not work

bluelovers avatar Aug 24 '20 19:08 bluelovers

How about not using esm-ts-node? When you have debug with esm-ts-node selected, you can instead run node -r esm -r ts-node/register directly

Garethp avatar Aug 24 '20 22:08 Garethp