Skip to content

Commit

Permalink
fix: don't attach to code cli in smart attach mode
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 committed Sep 17, 2020
1 parent 207b7d5 commit e460282
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/targets/node/bootloader.ts
Expand Up @@ -181,6 +181,12 @@ function shouldSmartAttach(env: IBootloaderInfo) {
return false;
}

// don't attach to code's cli. This is a little annoying to match with
// patterns, and users will never want it, so do it manually.
if (process.env.ELECTRON_RUN_AS_NODE === '1' && /(visual studio|vs) code/i.test(script)) {
return false;
}

// otherwise, delegate to the patterns. Defaults exclude node_modules
return autoAttachSmartPatternMatches(script, env);
}
Expand Down

0 comments on commit e460282

Please sign in to comment.