Troubleshooting
🔨 Restoring VS Code Notification Popups
Section titled “🔨 Restoring VS Code Notification Popups”If you ever accidentally dismiss a useful popup or warning notification in VS Code and it doesn’t come back (perhaps you clicked “Never” or some other button that dismisses it forever), there is a way to get those notifications back. Just create a new blank Profile, and whatever action you previously did that triggered the popup will once again appear.
For example, when VS Code prompts with “Would you like to save a configuration in your launch.json for easy access later?” after running Debug: Open Link to set up a debug configuration (see Debugging), there is a “Never” button that tells VS Code to never ask you that again.
- Open the Profile Switcher by clicking the bottom-left of the Activity Bar (typically a gear icon) and choose
Profile > Profiles. - Click the “New Profile” button.
- Give the profile a name (perhaps “Reset”)
- Choose “None” from the “Copy from” drop-down.
- Click the “Create” button. The new profile will appear in the list of profiles.
- Click the checkmark next to the new profile to make it active.
Now, when you try that action which prompts the notification, it should appear.
git push Failed
Section titled “git push Failed”Sometimes, when you do a git push, you will get an error message that contains “failed to push some refs”. Usually, this is because there have been changes to the remote repository (e.g.: on GitHub) that you haven’t got on your local repository (i.e.: your computer).
error: failed to push some refs to 'https://github.com/example/repo'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.The short fix is to do a git pull. Better yet, split the git pull into its two parts:
git fetch origin- This gets the latest changes from GitHub onto your computer. They are not part of your main branch yet - that’s the next step.git merge origin/<branch-name> -m "Merge upstream commits"- Typically, your branch name will bemain(ormasterfor older-style repos).
If you just do a git pull or if you do a git merge without the -m flag, you might be prompted for a merge message. Simply enter your message as the first line and then exit the editor. If you’re using VS Code as your git editor, that should be easy. If you’ve left it to the default of the vim editor, then you would need to press ESC + :wq or press ESC + Shift + zz.
Port In Use
Section titled “Port In Use”This has happened to me a couple of times. When running some node application that launches the browser (in my case, vitest --ui), I ran into a problem where the port that the Node application was trying to use was already in use.
EACCES: permission denied ::1:51204I’m running Windows 11, so if I want to see what ports are reserved/in use, I can run the following in the terminal.
netsh interface ipv4 show excludedportrange protocol=tcpSure enough, port 51204 was in the range of excluded ports. I’m not sure why, but for some reason this happens every blue moon…
The fix is pretty easy. Open a terminal in Administrator mode and run the following:
net stop winnatnet start winnat