Skip to main content

VS Code

Debugger

Extensions

Settings

Using TailwindCSS

Searching in VS Code

Remote development with SSH

Writing import statements automatically

  • only TS/JS? python too?
  • Vs code feature or eslint feature?
  • So convenient!
  • Don’t write imports
  • Write your code and let VS Code tell you when you’ve referenced something that needs to be imported
  • Use cmd-. to open the code actions menu and choose the option that offers to automatically add your missing import for you
  • One gotcha: similarly-named imports can get confused
    • I’ve encountered the same category of bug twice recently:
    • An error seems really weird and tough to debug
    • Turns out it’s caused by a file importing the wrong version of something that’s exported twice in the project under the same name
    • Happens while allowing VS Code to automatically import for me
    • Super convenient in general, but sometimes VS Code may guess incorrectly
    • What to do?
      • When debugging, check the imports in the related files to make sure everything is coming from the right place
      • As a preventative measure, avoid reusing the same export name twice in the same project

Dev Containers

Testing

Inbox