# Switch between Debug and Release build

**URL:** <https://forum.legato.io/t/switch-between-debug-and-release-build/6256>\
**Category:** VSCode\
**Created:** [July 27, 2022, 4:39pm UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256 "2022-07-27T16:39:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmark](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pmark](https://forum.legato.io/u/pmark)\
**Post date:** [July 27, 2022, 4:39pm UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256/1 "2022-07-27T16:39:47Z")

</div>

I have a setup where I can build and debug in VSCode, but how can I switch and build in Release mode ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 27, 2022, 5:01pm UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256/2 "2022-07-27T17:01:35Z")

</div>

Where do you see this release mode in vscode?

> **[Legato Plugin for VSCode - Legato Docs](https://docs.legato.io/latest/tools_vsCode.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![pmark](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pmark](https://forum.legato.io/u/pmark)\
**Post date:** [July 27, 2022, 5:06pm UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256/3 "2022-07-27T17:06:05Z")

</div>

I mean how do I compile an optimized -O3, stripped and without debug symbols .update file ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 28, 2022, 1:02am UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256/4 "2022-07-28T01:02:29Z")

</div>

you can try adding cflag in .cdef:

> **[Component Definition .cdef - Legato Docs](https://docs.legato.io/latest/defFilesCdef.html#defFilesCdef_cFlags)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

Or you can add compiler option in mkapp:

> **[mkapp - Legato Docs](https://docs.legato.io/latest/buildToolsmkapp.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![pmark](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pmark](https://forum.legato.io/u/pmark)\
**Post date:** [July 28, 2022, 1:22pm UTC](https://forum.legato.io/t/switch-between-debug-and-release-build/6256/5 "2022-07-28T13:22:07Z")

</div>

Thanks I will try those
