<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Bobby Johnson</title>
    <description>The latest articles on Forem by Bobby Johnson (@notmyself).</description>
    <link>https://forem.com/notmyself</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F426353%2F6de96394-5837-45cf-93f1-fb994e7dff2c.jpg</url>
      <title>Forem: Bobby Johnson</title>
      <link>https://forem.com/notmyself</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/notmyself"/>
    <language>en</language>
    <item>
      <title>Your Terminal and You: Dotfiles</title>
      <dc:creator>Bobby Johnson</dc:creator>
      <pubDate>Tue, 10 Nov 2020 16:29:28 +0000</pubDate>
      <link>https://forem.com/notmyself/your-terminal-and-you-dotfiles-58je</link>
      <guid>https://forem.com/notmyself/your-terminal-and-you-dotfiles-58je</guid>
      <description>&lt;p&gt;Have you ever watched a skilled engineer pull up a terminal, issue a few keystrokes and kick off a whole series of processes in seconds? It can be downright magical, some even wizard-like. A few are hard to distinguish from cackling necromancers raising processes from the dead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1502919280275-1bed9aca68ab%3Fixlib%3Drb-1.2.1%26q%3D80%26fm%3Djpg%26crop%3Dentropy%26cs%3Dtinysrgb%26w%3D1000%26fit%3Dmax%26ixid%3DeyJhcHBfaWQiOjExNzczfQ" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1502919280275-1bed9aca68ab%3Fixlib%3Drb-1.2.1%26q%3D80%26fm%3Djpg%26crop%3Dentropy%26cs%3Dtinysrgb%26w%3D1000%26fit%3Dmax%26ixid%3DeyJhcHBfaWQiOjExNzczfQ" alt="Photo by Rhett Wesley / Unsplash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll let you in on a little secret, engineers who are comfortable on the command line are not wizards, they are pack rats. They accumulate techniques and store them away in a toolbox and take it everywhere they go.&lt;/p&gt;

&lt;p&gt;That engineer can sit down at any machine and within minutes reach into their toolbox and become productive.&lt;/p&gt;

&lt;p&gt;Let's take a look at one technique that I use. It is not my technique, like all good pack rats I borrowed it from countless others and added them to my toolbox.&lt;/p&gt;

&lt;p&gt;The technique I use, is fairly macOS focused. It will work on macOS, Linux and WSL on Windows. You can do similar things in PowerShell, I encourage you to take a look at &lt;a href="https://baldbeardedbuilder.com/" rel="noopener noreferrer"&gt;Michael Jolly&lt;/a&gt;'s &lt;a href="https://github.com/builders-club/devtoolbox" rel="noopener noreferrer"&gt;devtoolbox&lt;/a&gt; project for examples.&lt;/p&gt;

&lt;p&gt;Let's start by creating your toolbox in a way that you can access it from any machine. Head to &lt;a href="https://github.com/new" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and create a new repository called &lt;strong&gt;dotfiles&lt;/strong&gt;. This is a common name for this kind of repository, remember it. You can find all kinds of great examples by looking at other peoples dotfiles repos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-8.54.01-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-8.54.01-AM.png" alt="Recommended settings for new dotfiles repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to allow others to use tools from your toolbox, consider adding an MIT license and making your repo public. Be sure to add a README file. It will be useful later when you want to start documenting things for others to consume.&lt;/p&gt;

&lt;p&gt;Once you have created the repository, let's clone it to your machine. We will do this in a special place called your home directory located in your user directory. We will also give it a special name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~
git clone git@github.com:NotMyself/dotfiles.git .dotfiles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use git to clone the repository to a directory named &lt;strong&gt;.dotfiles&lt;/strong&gt;. Notice the period in front of the directory name. This makes the directory a hidden one. Trying running these two commands to see what I mean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls
ls&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command lists the files and directories in the current directory. Notice that the &lt;strong&gt;.dotfiles&lt;/strong&gt; directory is not displayed. The second command uses the -a flag to show all files and directories.&lt;/p&gt;

&lt;p&gt;Here is what it looks like on my machine currently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-9.31.50-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-9.31.50-AM.png" alt="running ls vs. ls -a"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, I have a variety of dot files for various things. Can you spot my &lt;strong&gt;.dotfiles&lt;/strong&gt; directory?&lt;/p&gt;

&lt;p&gt;Next, you will need to wire up your &lt;strong&gt;.dotfiles&lt;/strong&gt; directory in a way that your terminal application will use it. By default, macOS terminal uses &lt;a href="http://zsh.sourceforge.net/" rel="noopener noreferrer"&gt;zsh&lt;/a&gt; as it's shell. So create a &lt;strong&gt;zsh&lt;/strong&gt; directory in the &lt;strong&gt;.dotfiles&lt;/strong&gt; directory and add a &lt;strong&gt;.zshrc&lt;/strong&gt; file to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.dotfiles
&lt;span class="nb"&gt;mkdir &lt;/span&gt;zsh
&lt;span class="nb"&gt;touch&lt;/span&gt; ./zsh/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a new shell is started in a terminal application, &lt;strong&gt;zsh&lt;/strong&gt; will look for a &lt;strong&gt;.zshrc&lt;/strong&gt; file in the home directory of the current user. It will then execute that file. Of course, your file is located in the &lt;strong&gt;.dotfiles/zsh&lt;/strong&gt; directory.&lt;/p&gt;

&lt;p&gt;We can fix that by creating a &lt;a href="https://en.wikipedia.org/wiki/Symbolic_link" rel="noopener noreferrer"&gt;symbolic link&lt;/a&gt; between the file's current location on disk and where &lt;strong&gt;zsh&lt;/strong&gt; expects it to be. To do that, create an &lt;strong&gt;install&lt;/strong&gt; script in your &lt;strong&gt;.dotfiles&lt;/strong&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"#&lt;/span&gt;&lt;span class="se"&gt;\!&lt;/span&gt;&lt;span class="s2"&gt;/usr/bin/env sh"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ./install
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"echo &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Installing..&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ./install
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ./install
./install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is a bit of magic going on here, so let's break it down. The first command creates a file named &lt;strong&gt;install&lt;/strong&gt; and adds a special value as the first line. This value is called a &lt;strong&gt;shebang&lt;/strong&gt;. It is used to decide how a file will be executed. In this case, the shebang checks the local system environment for the configured shell. So this install script will execute in &lt;strong&gt;zsh&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The next command, adds a line to the install file that will write the text &lt;strong&gt;"Installing..."&lt;/strong&gt; to the terminal when the install script is executed. We will use this to verify everything is working correctly.&lt;/p&gt;

&lt;p&gt;Text files in macOS are not typically executable. So the next command explicitly set the install text file as executable. This only needs to be done once when you create a script file.&lt;/p&gt;

&lt;p&gt;The final command executes the install script. The output on my machine looks like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-10.03.15-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3-us-west-1.amazonaws.com%2Fiamnotmyself-com%2F2020%2F11%2FScreen-Shot-2020-11-09-at-10.03.15-AM.png" alt="Running the install script"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, add the command needed to create the symbolic link to the .zshrc file to the install script. Open the install script in a text editor and add the following line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# shell settings&lt;/span&gt;
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sv&lt;/span&gt; /Users/bobby/.dotfiles/zsh/.zshrc ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that your user directory name will be different than mine. Be sure to change the &lt;strong&gt;bobby&lt;/strong&gt; value to the name of your user directory. If you are not sure what that name is run &lt;code&gt;echo ~&lt;/code&gt; in your terminal to display the full path to your home directory.&lt;/p&gt;

&lt;p&gt;This is a key concept in creating your toolbox. Instead of just looking up commands and running them once to set things up make a script file that does it so you do not have to look it up again.&lt;/p&gt;

&lt;p&gt;I simply looked at my &lt;a href="https://github.com/NotMyself/dotfiles/blob/master/install" rel="noopener noreferrer"&gt;install script&lt;/a&gt; in my &lt;a href="https://github.com/notmyself/dotfiles" rel="noopener noreferrer"&gt;dotfiles&lt;/a&gt; repository to find the symlink command. See, I am not a wizard I am a pack rat.&lt;/p&gt;

&lt;p&gt;At this point you should commit your changes to the Git repository. Now, run the install script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may receive an error that a file named .zshrc already exists in your home directory. In that case, make a backup of that file for later review and run the install again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv&lt;/span&gt; ~/.zshrc ~/.zshrc_backup
./install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now list the contents of your home directory and you should see the &lt;strong&gt;.zshrc&lt;/strong&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember though, this is a symbolic link to the file in our &lt;strong&gt;.dotfiles&lt;/strong&gt; repository. Which basically makes it our entry point to setup our shell any way we want.&lt;/p&gt;

&lt;p&gt;Now, let's make it do something interesting. Open the &lt;strong&gt;~/.dotfiles/zsh/.zshrc&lt;/strong&gt; file in a text editor and add the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;DOTFILE &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;find /Users/bobby/.dotfiles/system&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$DOTFILE&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="nv"&gt;$DOTFILE&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script will execute each of the files located in the &lt;strong&gt;system&lt;/strong&gt; directory in our &lt;strong&gt;.dotfiles&lt;/strong&gt; directory. Making them available to the current shell.&lt;/p&gt;

&lt;p&gt;I typically setup a series of files in the system folder: &lt;strong&gt;.alias&lt;/strong&gt;, &lt;strong&gt;.env&lt;/strong&gt;, &lt;strong&gt;.function&lt;/strong&gt;, &lt;strong&gt;.path&lt;/strong&gt;, and &lt;strong&gt;.prompt&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;.alias - contains a set of command aliases to commands that already exist on my machine.&lt;/li&gt;
&lt;li&gt;.env - contains commands to add additional functionality into my terminal environment.&lt;/li&gt;
&lt;li&gt;.function - contains a set of functions that are useful in my terminal environment.&lt;/li&gt;
&lt;li&gt;.path - updates the $PATH to include any other binary sources on my machine.&lt;/li&gt;
&lt;li&gt;.prompt - contains the configuration needed to setup my fancy shell prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Aliases can be very useful for common commands containing elaborate flags and values that you use regularly. Let's set up a few so you can see how easy it is. First, we need to set up the &lt;strong&gt;.alias&lt;/strong&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.dotfiles
&lt;span class="nb"&gt;mkdir &lt;/span&gt;system
&lt;span class="nb"&gt;touch &lt;/span&gt;system/.function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add the following code to the &lt;strong&gt;.alias&lt;/strong&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;l&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ls -la"&lt;/span&gt;       &lt;span class="c"&gt;# List in long format, include dotfiles&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;ld&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ls -ld */"&lt;/span&gt;   &lt;span class="c"&gt;# List in long format, only directories&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ..&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cd .."&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ...&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cd ../.."&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ....&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cd ../../.."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These aliases are ones that I use for navigating around the file system. As you can see they are simply shortcuts for other commands.&lt;/p&gt;

&lt;p&gt;Functions on the other hand allow you to do more complex tasks with a single command. Let's set you up with one of my favorite functions. Typically when I create a new directory using the &lt;strong&gt;mkdir&lt;/strong&gt; command the very next thing I do is change directories into the one I just created.&lt;/p&gt;

&lt;p&gt;Let's create a function that does this in one command instead of two. First, you need to create the &lt;strong&gt;.function&lt;/strong&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.dotfiles
&lt;span class="nb"&gt;touch &lt;/span&gt;system/.function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, add the following code to the .function file using a text editor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a new directory and enter it&lt;/span&gt;
&lt;span class="k"&gt;function &lt;/span&gt;mk&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now when you wish to create a directory and enter it you can execute the command &lt;code&gt;mk foo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Commit these changes to your &lt;strong&gt;dotfiles&lt;/strong&gt; repository.&lt;/p&gt;

&lt;p&gt;And with that your toolbox is setup. Start collecting the tools that make you look like a wizard. You can take a look at my &lt;a href="https://github.com/NotMyself/dotfiles" rel="noopener noreferrer"&gt;dotfiles&lt;/a&gt; repository for ideas. Or, search &lt;a href="https://github.com/search?q=dotfiles&amp;amp;type=repositories" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; for others.&lt;/p&gt;

</description>
      <category>bash</category>
    </item>
    <item>
      <title>Debugging .NET Core via Symbol Server on OSX in VSCode</title>
      <dc:creator>Bobby Johnson</dc:creator>
      <pubDate>Tue, 07 Jul 2020 17:06:51 +0000</pubDate>
      <link>https://forem.com/notmyself/debugging-net-core-via-symbol-server-on-osx-in-vscode-3pge</link>
      <guid>https://forem.com/notmyself/debugging-net-core-via-symbol-server-on-osx-in-vscode-3pge</guid>
      <description>&lt;p&gt;In a previous life, I was a heavy user of Visual Studio on Windows. But for the last few years I have been working exclusively on Mac OSX and using VSCode as my primary editor.&lt;/p&gt;

&lt;p&gt;One feature of the full Visual Studio that I miss is integrating with a Symbol Server for debugging code that does not belong to me.&lt;/p&gt;

&lt;p&gt;If you are not familiar with how a debugger works (at least in .NET), debugging information is stored in a symbol file separate from the executable that is being built by a compiler. All modern version of Microsoft compilers store that information in  a program database file, or .pdb.&lt;/p&gt;

&lt;p&gt;You might recognize those files from building a debug version of your applications. But did you know that Microsoft also produces symbol files for the .NET Core framework libraries as well?&lt;/p&gt;

&lt;p&gt;And they make those symbols available via a Symbol Server. A symbol server enables debuggers to automatically retrieve the correct symbol files for a given library.&lt;/p&gt;

&lt;p&gt;Micorsoft also makes their source code available via a Source Server. This allows a client to retrieve the exact version of the source code that were used to build an assembly.&lt;/p&gt;

&lt;p&gt;Combining a Symbol and Source Server it is possible to debug right into any library you are using just like you do with your own code.&lt;/p&gt;

&lt;p&gt;In full Visual Studio there is a deeply nested configration setting that you enable to make all this work. It is a bit more involved to get working in VSCode, let me outline the steps for you.&lt;/p&gt;

&lt;p&gt;First, install the dotnet cli global tool for symbols.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet tool &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--add-source&lt;/span&gt; https://api.nuget.org/v3/index.json &lt;span class="se"&gt;\&lt;/span&gt;
    dotnet-symbol
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will add everything that is needed to fetch symbols from the primary NuGet source. This happens to be where we get all of the .NET libraries from.&lt;/p&gt;

&lt;p&gt;We can use this tool now by issuing the command dotnet symbol from our terminals.&lt;/p&gt;

&lt;p&gt;Next, we need to pull the symbols for the meta package we are using to build the application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet symbol &lt;span class="nt"&gt;--symbols&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; /tmp/symbols &lt;span class="se"&gt;\&lt;/span&gt;
  /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/3.1.2/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will use the symbol tool to download the pdb symbol  files to a temporary directory for all the dlls found in the AspNetCore meta package version 3.1.2 that is located on my local machine.&lt;/p&gt;

&lt;p&gt;Once downloaded, we can copy them into the meta package directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cp&lt;/span&gt; /tmp/symbols/&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/3.1.2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now that the symbols are in the right place, the debugger can use them to fetch source code and debug into the .NET Core framework. These steps only need to be completed once per .NET Core SDK you have installed. Any application you build from here out on that SDK will have the symbols available to it.&lt;/p&gt;

&lt;p&gt;But if we jump into VSCode and attempt to debug an application, we will start seeing messages like this in the Debug Console.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;Loaded &lt;span class="s1"&gt;'/src/sample/src/server/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Protocols.dll'&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
Skipped loading symbols.
Module is optimized and the debugger option &lt;span class="s1"&gt;'Just My Code'&lt;/span&gt; is enabled.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This message is telling us that the debugger skipped loading external symbols because the "Just My Code" debugger option is enabled.&lt;/p&gt;

&lt;p&gt;This is a feature of the debugger that allows us to focus our debugging session only on code that we have written. And that is probably the normal state we want to use.&lt;/p&gt;

&lt;p&gt;But we can easily tell the debugger that we want to debug all the code we have symbols for by setting a flag in the launch.json file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"configurations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".NET Core Launch (web)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"coreclr"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"launch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"preLaunchTask"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"program"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${workspaceFolder}/src/server/bin/Debug/netcoreapp3.1/server.dll"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"cwd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${workspaceFolder}/src/server"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"stopAtEntry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"justMyCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"ASPNETCORE_ENVIRONMENT"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Development"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In this example, we have added the &lt;code&gt;justMyCode&lt;/code&gt; property to the .NET Core Launch configuration and set it's value to false.&lt;/p&gt;

&lt;p&gt;And just like that, we are debugging the .NET Core framework libraires on our local machine. &lt;/p&gt;

</description>
      <category>vscode</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
