{"id":1003,"date":"2026-05-03T15:25:09","date_gmt":"2026-05-03T22:25:09","guid":{"rendered":"https:\/\/sysprogs.com\/tutorials\/?p=1003"},"modified":"2026-05-03T18:44:08","modified_gmt":"2026-05-04T01:44:08","slug":"editing-code-with-codevroom","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/CodeVROOM\/tutorials\/cpp\/editing\/","title":{"rendered":"Editing C\/C++ Code with CodeVROOM"},"content":{"rendered":"<p>This tutorial shows the code-editing techniques supported by the latest CodeVROOM release. Although the screenshots show a Windows system, the same features also work on Linux and MacOS.<\/p>\n<p>Before you begin, follow the\u00a0quickstart tutorial for <a href=\"https:\/\/sysprogs.com\/CodeVROOM\/tutorials\/stm32\/windows\/\">Windows<\/a>, <a href=\"https:\/\/sysprogs.com\/CodeVROOM\/tutorials\/stm32\/linux\/\">Linux <\/a>or <a href=\"https:\/\/sysprogs.com\/CodeVROOM\/tutorials\/stm32\/macos\/\">MacOS<\/a> to create a simple STM32-based project. Once you created and built it, follow the steps shown here to try out various editing functionality:<\/p>\n<ol>\n<li>Go to the <strong>MSC_Application()<\/strong> function. Let&#8217;s try calling <strong>f_mount()<\/strong>. CodeVROOM uses VisualGDB&#8217;s filtering logic, so it also works with incomplete string and acronyms. Try typing &#8220;mou&#8221; and f_mount will get selected:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1040\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/01-mount-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Complete it by pressing TAB. Now we will try to the USBDISKFatFS variable. As there are many different preprocessor macros starting with DISK, the correct variable will be initially at the end of the list. You can fix this by turning on type-based filters. Click the teal diamond icon below the suggestion list, and it will be filtered to only show variables:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1041\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/02-filter-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Select the use of the MyFile variable below. Note how CodeVROOM shows that it&#8217;s a global variable (without scope) and can also display all local references to it if you use the drop-down box in the top right corner of the editor:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1042\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/03-filerefs-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Local references only work within the current source file. To search the entire project, right-click on <strong>f_open()<\/strong> and select &#8220;Find all references&#8221;:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1043\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/04-refs-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>You can use the outline window on the left, or the navigation bar on top of the editor to quickly jump between different symbols in the file:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1045\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/06-outline-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Go to the definition of MyFile and delete the line containing it. Note how the scrollbar highlights a cluster of errors in the lines referring to it:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1046\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/07-deleted-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Try building the project. Note how GCC only reported the first occurrence of the missing symbol, while the Clang-based Quick Check found all of them. To distinguish between the Quick Check errors and build errors, the former are shown with the lightning symbol:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1047\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/08-errors-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a>You can use the filtering controls in the errors window to switch between viewing both of error sources, or just one.<\/li>\n<li>Switch to the Output window. The CMake output parser automatically recognizes command lines reported by Ninja and shows them in cyan:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1048\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/09-log-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Right-click on the GCC invocation and select &#8220;Run in Smart Terminal&#8221;:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1049\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/10-term-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>This will copy the entire command line (including the environment) to the terminal, and will run it:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1050\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/11-error-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a>Note that you can import the error messages from the terminal back into the Errors window by clicking the &#8220;N errors&#8221; link.<\/li>\n<li>Press &#8216;Up&#8217; to show the command line again, and click the edit button in the bottom right corner. This will open a multi-line edit window for the command line:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1051\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd.png\" alt=\"\" width=\"1011\" height=\"533\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd.png 1011w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd-300x158.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd-768x405.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/12-cmd-390x205.png 390w\" sizes=\"(max-width: 1011px) 100vw, 1011px\" \/><\/a><\/li>\n<li>Change it to preprocess the file instead of compiling it:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1056\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1.png\" alt=\"\" width=\"1011\" height=\"533\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1.png 1011w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1-300x158.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1-768x405.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/13-preprocess-1-390x205.png 390w\" sizes=\"(max-width: 1011px) 100vw, 1011px\" \/><\/a><\/li>\n<li>You can easily locate the preprocessing output by using the file panel. Enable it via the toolbar and navigate to CMakeFiles\/EmbeddedProject1.dir\/Src:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1053\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/14-nav-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>Right-click on the main.E file and select &#8220;Open in Editor&#8221;:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1054\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/15-opened-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<li>This will temporarily attach the file to the active project, so the Clang engine will parse it and display the outline. You can use it to quickly find the relevant parts and troubleshoot errors related to preprocessor macros:<a href=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1055\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file.png\" alt=\"\" width=\"1289\" height=\"795\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file.png 1289w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file-300x185.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file-1024x632.png 1024w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2026\/05\/16-file-768x474.png 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/a><\/li>\n<\/ol>\n<p>More features are coming soon. Follow us on <a href=\"https:\/\/x.com\/Sysprogs\">X<\/a> for updates.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows the code-editing techniques supported by the latest CodeVROOM release. Although the screenshots show a Windows system, the<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[76],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/1003"}],"collection":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1003"}],"version-history":[{"count":4,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/1003\/revisions"}],"predecessor-version":[{"id":1057,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/1003\/revisions\/1057"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}