0

Basically, we are using a particular flavor of Javascript at work that has the word debug as a keyword. I am using VS Code for development, and it's driving me nuts that it always autocorrects debug to debugger. Is there any config file I can use to tell VS Code to stop having me press backspace 3 times or having my program crash if I don't notice? Pretty sure it's a recent thing too.

enter image description here

adinutzyc21
  • 1,538
  • 1
  • 11
  • 23
  • 2
    What do you mean by _"autocorrects"_? I've never had VSCode change anything I've typed after I've typed it. Try not pressing Tab or Enter when the suggestions come up – Phil Jan 30 '19 at 04:02
  • If I type `debug(` the second I put the `(` there it autocorrects. It didn't use to, but it definitely does now... Our project was recently converted to Typescript, could that be the culprit? I disabled the error logs for that one... – adinutzyc21 Jan 30 '19 at 04:10
  • What version (I'll check against mine)? So you type `d-e-b-u-g-(` and at that last keypress, it changes `debug` to `debugger` (I'm just trying to establish exact reproduction parameters)? – Phil Jan 30 '19 at 04:11
  • See the edited question / gif – adinutzyc21 Jan 30 '19 at 04:14
  • I can reproduce this on mine (1.30.2) but only if I don't define the `debug` symbol. Eg, if I put `import { debug } from 'util'` or `function debug() { }` first, it doesn't auto-complete – Phil Jan 30 '19 at 04:14
  • But this is a special debug, not the `util` debug :( The language we're using defines the symbols in XML... I can't edit code in that way... – adinutzyc21 Jan 30 '19 at 04:15
  • It was just an example. Why isn't `debug` imported / required / etc into the current script? – Phil Jan 30 '19 at 04:16
  • It's background setup, language-specific symbols are defined in an XML. I can't edit the code to define the symbol.. So there is no configuration file where I can define keywords? – adinutzyc21 Jan 30 '19 at 04:17
  • I'm still learning TypeScript but does this help ~ https://stackoverflow.com/a/43523944/283366. Basically, I would try and define the `debug` function / interface so VSCode picks it up – Phil Jan 30 '19 at 04:20

0 Answers0