<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-AU">
  <id>https://david.gardiner.net.au/tags/Visual%20Studio%20Code.xml</id>
  <title type="html">David Gardiner - Visual Studio Code</title>
  <updated>2026-04-15T00:26:29.646Z</updated>
  <subtitle>Blog posts tagged with &apos;Visual Studio Code&apos; - A blog of software development, .NET and other interesting things</subtitle>
  <rights>Copyright 2026 David Gardiner</rights>
  <icon>https://www.gravatar.com/avatar/37edf2567185071646d62ba28b868fab?s=64</icon>
  <logo>https://www.gravatar.com/avatar/37edf2567185071646d62ba28b868fab?s=256</logo>
  <generator uri="https://github.com/flcdrg/astrojs-atom" version="3">astrojs-atom</generator>
  <author>
    <name>David Gardiner</name>
  </author>
  <link href="https://david.gardiner.net.au/tags/Visual%20Studio%20Code.xml" rel="self" type="application/atom+xml"/>
  <link href="https://david.gardiner.net.au/tags/Visual%20Studio%20Code" rel="alternate" type="text/html" hreflang="en-AU"/>
  <category term="Visual Studio Code"/>
  <category term="Software Development"/>
  <entry>
    <id>https://david.gardiner.net.au/2020/11/debugging-jest-vscode</id>
    <updated>2020-11-10T12:00:00.000+10:30</updated>
    <title>The case of the disappearing &apos;Debug&apos; CodeLens in Visual Studio Code</title>
    <link href="https://david.gardiner.net.au/2020/11/debugging-jest-vscode" rel="alternate" type="text/html" title="The case of the disappearing &apos;Debug&apos; CodeLens in Visual Studio Code"/>
    <category term="Unit Testing"/>
    <category term="Visual Studio Code"/>
    <published>2020-11-10T12:00:00.000+10:30</published>
    <summary type="html">Or how to debug any Jest unit test in Visual Studio Code</summary>
    <content type="html">&lt;p&gt;&lt;em&gt;Or how to debug any Jest unit test in Visual Studio Code&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&apos;m trying to debug a TypeScript unit test which uses the Jest library. There&apos;s a nice VS Code extension &lt;a href=&quot;https://github.com/jest-community/vscode-jest&quot;&gt;vs-jest&lt;/a&gt; that integrates with Jest and even adds CodeLens labels so you can click to debug a specific test. Except the debug label kept disappearing! It would show when I first loaded the folder in Code, but after the tests all ran then the label would go away. Even though the test is passing, I wanted to debug it so I could step through the code. What&apos;s going on?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vscode-jest-debug-missing.IbIyQjlD_1QhfIU.webp&quot; alt=&quot;Screenshot showing &apos;Debug&apos; going away&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There&apos;s some troubleshooting tips listed on the &lt;a href=&quot;https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting&quot;&gt;vscode-jest README&lt;/a&gt;. This gave me the hint that there are some config settings that can alter how the extension behaves. When I viewed my current settings.json, I saw this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;typescript.tsdk&quot;: &quot;node_modules\\typescript\\lib&quot;,
    &quot;eslint.packageManager&quot;: &quot;yarn&quot;,
    &quot;eslint.validate&quot;: [
        &quot;javascript&quot;,
        {&quot;language&quot;: &quot;typescript&quot;, &quot;autoFix&quot;: true }
    ],
    &quot;jest.debugCodeLens.showWhenTestStateIn&quot;: [
        &quot;fail&quot;,
        &quot;unknown&quot;
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That last setting caught my attention. Clicking inside that array and code completion offered two other values &quot;pass&quot; and &quot;skip&quot;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    &quot;jest.debugCodeLens.showWhenTestStateIn&quot;: [
       &quot;pass&quot;,
       &quot;skip&quot;,
        &quot;fail&quot;,
        &quot;unknown&quot;
    ]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Adding those and hitting save, and then the &apos;debug&apos; labels returned and stayed for all the tests!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>https://david.gardiner.net.au/2020/05/wsl2-visualstudio-code</id>
    <updated>2020-05-12T09:57:00.000+09:30</updated>
    <title>Visual Studio Code and WSL2</title>
    <link href="https://david.gardiner.net.au/2020/05/wsl2-visualstudio-code" rel="alternate" type="text/html" title="Visual Studio Code and WSL2"/>
    <category term="WSL2"/>
    <category term="Visual Studio Code"/>
    <published>2020-05-12T09:57:00.000+09:30</published>
    <summary type="html">I&apos;m not the only one playing around with running Jekyll in WSL2 for my blog: Been playing with converting my blog to @Jekyllrb But compile times were bad.   WSL2 + blog on /mnt/c/source/blog -&amp;gt; 60sWSL2 + blog inside the native linux filesystem ~/blog -&amp;gt; 0.5s   Seems the WSL notes on I/O perf hit when going through filesystem bridge is real @richturn_ms — Ðavid Ƀurela (@DavidBurela) May 10, 2020 Inspired by David&apos;s tweet, I figured it was time I gave it a go. It was remarkably easy! …</summary>
    <content type="html">&lt;p&gt;I&apos;m not the only one playing around with running &lt;a href=&quot;https://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; in WSL2 for my blog:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Been playing with converting my blog to &lt;a href=&quot;https://twitter.com/jekyllrb?ref_src=twsrc%5Etfw&quot;&gt;@Jekyllrb&lt;/a&gt; But compile times were bad.  &lt;/p&gt;
&lt;p&gt;WSL2 + blog on /mnt/c/source/blog -&amp;gt; 60s&lt;br /&gt;WSL2 + blog inside the native linux filesystem ~/blog -&amp;gt; 0.5s  &lt;/p&gt;
&lt;p&gt;Seems the WSL notes on I/O perf hit when going through filesystem bridge is real &lt;a href=&quot;https://twitter.com/richturn_ms?ref_src=twsrc%5Etfw&quot;&gt;@richturn_ms&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;— Ðavid Ƀurela (@DavidBurela) &lt;a href=&quot;https://twitter.com/DavidBurela/status/1259471900280975366?ref_src=twsrc%5Etfw&quot;&gt;May 10, 2020&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;p&gt;Inspired by David&apos;s tweet, I figured it was time I gave it a go. It was remarkably easy!&lt;/p&gt;
&lt;p&gt;First, make sure I&apos;m on the WSL2 disk (not the mounted Windows disk)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now pull down my blog repo&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/flcdrg/flcdrg.github.io.git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start Visual Studio Code in the current directory&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;code .
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This magically installed some &apos;server&apos; bits into WSL2&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Updating VS Code Server to version d69a79b73808559a91206d73d7717ff5f798f23c
Removing previous installation...
Installing VS Code Server for x64 (d69a79b73808559a91206d73d7717ff5f798f23c)
Downloading: 100%
Unpacking: 100%
Unpacked 2321 files and folders to /home/david/.vscode-server/bin/d69a79b73808559a91206d73d7717ff5f798f23c.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then Visual Studio Code launched&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/wsl2-vscode-editor.vlntKNlk_1nGxve.webp&quot; alt=&quot;Visual Studio Code editing git repo in WSL2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;But how can I save screenshots and other images now that the repo is stored inside WSL2? Easy as it turns out. I right-clicked on the &lt;code&gt;assets&lt;/code&gt; folder in Code and chose &lt;strong&gt;Reveal in Explorer&lt;/strong&gt; and it brings up Windows Explorer pointing to an internal share mapped back to the Linux disk. I can access the same path from the snipping tool too!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/wsl2-vscode-explorer.Dz9qVyaw_1B73ov.webp&quot; alt=&quot;Windows Explorer in git repo in WSL2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And how fast is Jekyll?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bundle exec jekyll serve --incremental 2&amp;gt;&amp;amp;1 | grep -E -v &apos;deprecated|GitHub Metadata&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On Windows: 120 seconds&lt;/p&gt;
&lt;p&gt;On Linux: 62 seconds&lt;/p&gt;
</content>
  </entry>
</feed>
