CodeRef
CodeRef
  • Software
    • VSCode
  • Midjourney_AI
    • Midjourney Cheat Sheet
  • aws
    • S3 Reference
    • Services
  • bash
    • .bashrc File Contents
    • CAN
    • _System Config File Locations
    • argument-length-limits
    • Conditionals
    • Data Structures
    • File Permissions
    • File Syncing
    • File System
    • Functions
    • General
    • Loops
    • My Functions
    • Networking
    • Number Operations
    • OpenVPN
    • Operators
    • Resource Management
    • Serial RS232
    • Spinning Wheel Animation
    • SSH
    • Text Operations
    • Environment Variables
  • cpp
    • ChatGPT | Pointers vs. References
    • arrays
    • Classes
    • Data Types / Structures
    • Enumerated Classes
    • Exception Handling
    • Function Objects
    • Functions
    • I/O
    • Loops
    • Macros
    • Namespaces
    • New Features
    • Pointers
    • Scope
    • Smart Pointers
    • Raw String Literals
    • Style Guide
    • Switch Case
    • Templating
    • How to Use tinyxml2
    • Useful Libraries
    • google-test
    • Conditionals
    • Rule of Three/Five
    • Optional Parameters
    • Keywords
    • Filesystem
    • Random
    • Casting
    • tools
  • git
    • Code Review Dependency Strategy
    • Git Bisect Guide
    • Git Reference
    • removing-cherry-picks
    • Useful Tools
    • Graphite Reference
  • js
    • functions
    • Javascript Reference
  • linux
    • Display
    • Dual Boot with Windows
    • File System
    • NVIDIA
    • Sending/Receiving TCP/UDP Messages in Ubuntu
    • dynamically_linked_binaries
  • markdown
    • Images
    • obsidian-reference
  • python
    • Classes
    • Exceptions
    • Functions
    • Operations
    • Python Reference
    • unittest_command-line-args
    • unittest_magicmock_GPT
    • unittest_mock
    • unittest_printing
    • unittest_subtest
    • useful-stuff
    • jupyter
    • poetry
  • ros
    • _ROS Cheat Sheet
    • Create New Workspace
    • Install ROS
    • Node Sample - Listener
    • Node Sample - Talker
    • Node Template
    • Setup
    • urdf
  • excel
    • excel-reference
  • windows
    • File System
    • WSL - Windows Subsystem for Linux
    • WSL
  • software_engineering
    • uncle_bob_lectures
      • Overview
      • Lesson 01 - Notes
  • web
    • Front End
    • Hugo
    • new_frontend_tools
  • sql
    • cheatsheet
Powered by GitBook
On this page
  • Settings
  • User
  • Remote
  • Workspace
  • Code Analysis Extensions
  • C++
  1. Software

VSCode

Settings

Where VSCode stores settings JSON files (on Windows):

User

C:\Users\<username>\AppData\Roaming\Code\User\settings.json

Remote

\\wsl.localhost\<wsl-distro>\home\<username>\.vscode-server\data\Machine\settings.json

Workspace

...repo\.vscode\settings.json

Code Analysis Extensions

C++

clangd:

  • Pros

    • Faster, instant click to definition

  • Cons

    • More complicated to set up

    • Have to manually build repo and refresh compile commands regularly, and then restart cland language server to keep go-to-definition up-to-date

    • It seems to not recognize a lot of symbols (classes, types, etc.) - there are a lot of red squiggles

    • When ctrl + clicking on a class type, it often doesn't go to the definition of that class, but rather to a variable of that type being declared, which is useless.

Microsoft C++ Extension:

  • Pros

    • Easy to install and set up

    • Updates compile commands automatically in the background

    • Better at following ctrl + click to definitions of classes

    • Recognizes almost all symbols, very few are not recognized

  • Cons

    • Slower

      • Often takes a few seconds to think when ctrl + clicking to go-to-definition, especially when you first open a file or ctrl + click a symbol for the first time in that session

      • Sometimes need to wait while automated refreshing compile commands runs in the background, symbols are not recognized in the meantime

Last updated 11 months ago