<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Visual Studio Code on kenji.blog</title><link>http://kenji.blog/en/tags/visual-studio-code/</link><description>Recent content in Visual Studio Code on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Fri, 13 Sep 2024 00:53:53 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/visual-studio-code/index.xml" rel="self" type="application/rss+xml"/><item><title>Trying Out the Qt Extension Pack in Visual Studio Code</title><link>http://kenji.blog/en/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/</link><pubDate>Fri, 13 Sep 2024 00:53:53 +0900</pubDate><guid>http://kenji.blog/en/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/</guid><description>&lt;img src="http://kenji.blog/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/img_1.png" alt="Featured image of post Trying Out the Qt Extension Pack in Visual Studio Code" />&lt;h1 id="getting-started-with-qt-development-in-vscode-how-to-install-the-qt-extension-pack">Getting Started with Qt Development in VSCode: How to Install the Qt Extension Pack
&lt;/h1>&lt;p>Hello, Kenji here.
This time, I&amp;rsquo;ll introduce &amp;ldquo;how to set up a Qt development environment in Visual Studio Code (hereafter VSCode)&amp;rdquo;.&lt;/p>
&lt;p>Recently, there has been an increasing demand for developing Qt applications using the lightweight and highly extensible VSCode, in addition to the official Qt Creator.
For those people, I recommend the &amp;ldquo;&lt;strong>Qt Extension Pack&lt;/strong>&amp;rdquo;.
Simply by installing this extension pack, you can get the main Qt-related extensions all at once.&lt;/p>
&lt;hr>
&lt;h2 id="target-audience">Target Audience
&lt;/h2>&lt;ul>
&lt;li>Those who want to start GUI application development using Qt&lt;/li>
&lt;li>Those who want to develop in VSCode instead of Qt Creator&lt;/li>
&lt;li>Those who find it troublesome to search for extensions one by one&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="prerequisites">Prerequisites
&lt;/h2>&lt;ul>
&lt;li>VSCode must be installed
(&lt;a class="link" href="https://code.visualstudio.com/" target="_blank" rel="noopener"
>You can download it for free from the official website&lt;/a>)&lt;/li>
&lt;li>The main Qt library must be installed (&lt;a class="link" href="https://www.qt.io/" target="_blank" rel="noopener"
>Qt Official Website&lt;/a>)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="what-is-the-qt-extension-pack">What is the Qt Extension Pack?
&lt;/h2>&lt;p>The Qt Extension Pack is an extension pack for VSCode.
By installing it, the following features are automatically added:&lt;/p>
&lt;ul>
&lt;li>Support for &lt;code>.ui&lt;/code> files (Qt Designer)&lt;/li>
&lt;li>Syntax highlighting for &lt;code>.pro&lt;/code> and &lt;code>.qrc&lt;/code> files&lt;/li>
&lt;li>C++ code completion, building, and debugging assistance for Qt&lt;/li>
&lt;li>Qt Resource Browser&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="installation-steps">Installation Steps
&lt;/h2>&lt;h3 id="1-open-vscode">1. Open VSCode
&lt;/h3>&lt;p>First, launch VSCode.&lt;/p>
&lt;h3 id="2-open-the-extensions-view">2. Open the Extensions View
&lt;/h3>&lt;p>Click the Activity Bar (square block icon) on the left side to show &amp;ldquo;Extensions&amp;rdquo;.&lt;/p>
&lt;p>Alternatively, you can press the shortcut
&lt;code>Ctrl + Shift + X&lt;/code>.&lt;/p>
&lt;h3 id="3-search-for-qt-extension-pack">3. Search for &amp;ldquo;Qt Extension Pack&amp;rdquo;
&lt;/h3>&lt;p>Enter the following keyword in the search bar:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">Qt Extension Pack
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>&lt;img src="http://kenji.blog/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/img.png"
width="867"
height="228"
srcset="http://kenji.blog/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/img_hua3a606fe260b4f1c55a0f37b6ed054ec_30325_480x0_resize_box_3.png 480w, http://kenji.blog/p/visual-studio-code-%E3%81%AB-qt-extension-pack-%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E3%81%BF%E3%81%9F/img_hua3a606fe260b4f1c55a0f37b6ed054ec_30325_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img.png"
class="gallery-image"
data-flex-grow="380"
data-flex-basis="912px"
>&lt;/p>
&lt;h3 id="4-click-the-install-button">4. Click the Install Button
&lt;/h3>&lt;p>When the target pack is displayed, click the &amp;ldquo;Install&amp;rdquo; button.
This will install multiple extensions at once, such as the following:&lt;/p>
&lt;ul>
&lt;li>Qt Language Support&lt;/li>
&lt;li>QML Support&lt;/li>
&lt;li>Qt Designer Integration&lt;/li>
&lt;li>CMake Tools (Essential for CMake-based Qt development)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="supplementary-project-settings-cmake--qt-example">Supplementary Project Settings (CMake + Qt Example)
&lt;/h2>&lt;p>If you use Qt with CMake, the combination with the following extensions is recommended:&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools" target="_blank" rel="noopener"
>CMake Tools&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://marketplace.visualstudio.com/items?itemName=twxs.cmake" target="_blank" rel="noopener"
>CMake Language Support&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Also, if you put the following description in your CMakeLists.txt, integration with Qt will be smooth:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-cmake" data-lang="cmake">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">find_package&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">Qt6&lt;/span> &lt;span class="s">REQUIRED&lt;/span> &lt;span class="s">COMPONENTS&lt;/span> &lt;span class="s">Widgets&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="err">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="err">&lt;/span>&lt;span class="nb">target_link_libraries&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">MyApp&lt;/span> &lt;span class="s">PRIVATE&lt;/span> &lt;span class="s">Qt6::Widgets&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="err">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;hr>
&lt;h2 id="bonus-how-to-open-ui-files">Bonus: How to open .ui files?
&lt;/h2>&lt;p>&lt;code>.ui&lt;/code> files can be edited in Qt Designer.
In VSCode, you can right-click a &lt;code>.ui&lt;/code> file → select &lt;code>Open with Qt Designer&lt;/code> (requires Qt Designer to be included in the &lt;code>PATH&lt;/code> environment variable).&lt;/p>
&lt;hr>
&lt;h2 id="summary">Summary
&lt;/h2>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Step&lt;/th>
&lt;th>Content&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>Launch VSCode&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>Open the Extensions Panel&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>Search for &amp;ldquo;Qt Extension Pack&amp;rdquo;&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>Click the Install button&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Setting up a Qt environment in VSCode is now much easier than before.
It has sufficient features as a substitute for Qt Creator, and is recommended for those who want to work nimbly.&lt;/p>
&lt;hr>
&lt;h2 id="recommended-links">Recommended Links
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://www.qt.io/" target="_blank" rel="noopener"
>Qt Official Website&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt" target="_blank" rel="noopener"
>Qt Extension Pack - Visual Studio Marketplace&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://code.visualstudio.com/" target="_blank" rel="noopener"
>VSCode Official Website&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools" target="_blank" rel="noopener"
>CMake Tools Extension&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="finally">Finally
&lt;/h2>&lt;p>From now on, I plan to proceed with development utilizing Qt UI tools and QML in this environment.
Next time, I plan to explain &lt;strong>how to build &amp;amp; run a Qt Hello World app from VSCode&lt;/strong>.&lt;/p>
&lt;p>See you next time!&lt;/p></description></item><item><title>Recommended Visual Studio Code Extensions</title><link>http://kenji.blog/en/p/visual-studio-code%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E6%8B%A1%E5%BC%B5%E6%A9%9F%E8%83%BD/</link><pubDate>Wed, 29 May 2024 17:20:19 +0900</pubDate><guid>http://kenji.blog/en/p/visual-studio-code%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E6%8B%A1%E5%BC%B5%E6%A9%9F%E8%83%BD/</guid><description>&lt;img src="http://kenji.blog/p/visual-studio-code%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E6%8B%A1%E5%BC%B5%E6%A9%9F%E8%83%BD/img.png" alt="Featured image of post Recommended Visual Studio Code Extensions" />&lt;h1 id="visual-studio-code-recommended-extensions-list">Visual Studio Code Recommended Extensions List
&lt;/h1>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Category&lt;/th>
&lt;th>Name&lt;/th>
&lt;th>Publisher&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Virtual / Container Management&lt;/td>
&lt;td>Remote Development&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports remote development by connecting to virtual containers / WSL via SSH&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Virtual / Container Management&lt;/td>
&lt;td>Docker&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports management of Docker containers&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Code Management&lt;/td>
&lt;td>GitHub Pull Requests&lt;/td>
&lt;td>GitHub&lt;/td>
&lt;td>Manage GitHub Pull Requests within VSCode&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Code Management&lt;/td>
&lt;td>GitHub Copilot&lt;/td>
&lt;td>GitHub&lt;/td>
&lt;td>Supports AI-based code completion&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Code Management&lt;/td>
&lt;td>Git Graph&lt;/td>
&lt;td>mhutchie&lt;/td>
&lt;td>Graphically displays Git branches and commits&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Code Management&lt;/td>
&lt;td>Git History&lt;/td>
&lt;td>Don Jayamanne&lt;/td>
&lt;td>Displays Git history&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Browser / Web Development&lt;/td>
&lt;td>Debugger for Firefox&lt;/td>
&lt;td>Firefox DevTools&lt;/td>
&lt;td>Use Firefox&amp;rsquo;s debugger within VSCode&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Browser / Web Development&lt;/td>
&lt;td>Microsoft Edge Tools for VS Code&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Use Edge&amp;rsquo;s developer tools within VSCode&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Browser / Web Development&lt;/td>
&lt;td>Vue Language Features (Volar)&lt;/td>
&lt;td>Vue&lt;/td>
&lt;td>Supports Vue language features&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Browser / Web Development&lt;/td>
&lt;td>JavaScript (ES6) code snippets&lt;/td>
&lt;td>charalampos karypidis&lt;/td>
&lt;td>Provides JavaScript snippets&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Browser / Web Development&lt;/td>
&lt;td>Tailwind CSS IntelliSense&lt;/td>
&lt;td>Tailwind Labs&lt;/td>
&lt;td>Provides Tailwind CSS snippets&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Cloud Development&lt;/td>
&lt;td>AWS Toolkit&lt;/td>
&lt;td>Amazon Web Services&lt;/td>
&lt;td>Supports AWS development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Cloud Development&lt;/td>
&lt;td>Azure Tools&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports Azure development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Cloud Development&lt;/td>
&lt;td>Google Cloud Tools&lt;/td>
&lt;td>Google Cloud&lt;/td>
&lt;td>Supports Google Cloud development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Database&lt;/td>
&lt;td>MySQL&lt;/td>
&lt;td>Jun Han&lt;/td>
&lt;td>Supports MySQL development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Database&lt;/td>
&lt;td>SQL Server (mssql)&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports SQL Server development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Database&lt;/td>
&lt;td>PostgreSQL&lt;/td>
&lt;td>Chris Kolkman&lt;/td>
&lt;td>Supports PostgreSQL development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Embedded&lt;/td>
&lt;td>PlatformIO&lt;/td>
&lt;td>PlatformIO&lt;/td>
&lt;td>Supports PlatformIO development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Embedded&lt;/td>
&lt;td>Arduino&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports Arduino development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Embedded&lt;/td>
&lt;td>WorkBench&lt;/td>
&lt;td>Particle&lt;/td>
&lt;td>Particle&amp;rsquo;s development environment, supporting IoT development including firmware, libraries, and cloud integration&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>C/C++&lt;/td>
&lt;td>C/C++ Extension Pack&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports C/C++ development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>C/C++&lt;/td>
&lt;td>C/C++ Runner&lt;/td>
&lt;td>franneck94&lt;/td>
&lt;td>Runs C/C++ code (supports gcc, msvc, cuda nvcc compilers)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>C/C++&lt;/td>
&lt;td>Cortex-Debug&lt;/td>
&lt;td>marus25&lt;/td>
&lt;td>Supports debugging of Cortex-A/R/M microcontrollers&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Python&lt;/td>
&lt;td>Python Extension Pack&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports Python development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Python&lt;/td>
&lt;td>Jupyter&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports Jupyter Notebook development&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Markdown All in One&lt;/td>
&lt;td>Yu Zhang&lt;/td>
&lt;td>Supports Markdown writing&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Hex Editor&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Edits binary files&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>vscode-pdf&lt;/td>
&lt;td>tomoki1207&lt;/td>
&lt;td>Displays PDF files&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Rainbow CSV&lt;/td>
&lt;td>mechatroner&lt;/td>
&lt;td>Displays CSV files colorfully&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Draw.io Integration&lt;/td>
&lt;td>Henning Dieterichs&lt;/td>
&lt;td>Use Draw.io within VSCode&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Japanese Language Pack for Visual Studio Code&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Japanese localization pack&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Utility / UI Extension&lt;/td>
&lt;td>Live Share&lt;/td>
&lt;td>Microsoft&lt;/td>
&lt;td>Supports real-time collaborative work&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table></description></item></channel></rss>