# Remote debugging C/C++ application via Developer Studio

**URL:** <https://forum.legato.io/t/remote-debugging-c-c-application-via-developer-studio/3349>\
**Category:** Uncategorized\
**Created:** [June 19, 2018, 10:42pm UTC](https://forum.legato.io/t/remote-debugging-c-c-application-via-developer-studio/3349 "2018-06-19T22:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmccarthy](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cmccarthy](https://forum.legato.io/u/cmccarthy)\
**Post date:** [June 19, 2018, 10:42pm UTC](https://forum.legato.io/t/remote-debugging-c-c-application-via-developer-studio/3349/1 "2018-06-19T22:42:48Z")

</div>

Earlier today I was able to attach to and debug my application via Developer Studio just fine, stepping through with no problems.

I saved the Ubuntu guest VM state in which I am doing my development and then came back to it some hours later.

Since the state was saved, I didn’t have to reopen anything, and I assumed I could jump back into debugging the problem I was trying to solve by simply clicking build and debug.

However, I was shown an error, and the debug session failed to start.

I have attached the screenshot of this error, it appears that the message text is cutoff and it says “gdbserver already ex…” at the end, so I am assuming it says “exists”, but I am not sure.

Any idea where these messages may be logged in full?

Thanks in advance. ![legato_debug](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/e225612659efee6c9082e49a7e6b6c00fa8a7bd2.PNG)

---

<div class="post-metadata">

**Author:** ![daav](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/daav/32/64_2.png) [@daav](https://forum.legato.io/u/daav)\
**Post date:** [June 20, 2018, 5:17am UTC](https://forum.legato.io/t/remote-debugging-c-c-application-via-developer-studio/3349/2 "2018-06-20T05:17:32Z")

</div>

Hi @cmccarthy  
looks like the embedded tool ( **gdbCfg** ) that DS is using to bind gdbserver inside the application sandbox is getting into troubles…  
Maybe because of some unstable state on the device, and/or unfinished Debug session…?  
My suggestion would be to try removing the app and try again the debug workflow.

---

<div class="post-metadata">

**Author:** ![cmccarthy](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cmccarthy](https://forum.legato.io/u/cmccarthy)\
**Post date:** [June 20, 2018, 3:05pm UTC](https://forum.legato.io/t/remote-debugging-c-c-application-via-developer-studio/3349/3 "2018-06-20T15:05:53Z")

</div>

Thanks again for your wonderful help.

That resolved the problem, I am able to attach the debugger again.
