# Trace/debug the application with cordova

**URL:** <https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402>\
**Category:** cordova\
**Created:** [November 8, 2017, 8:26am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402 "2017-11-08T08:26:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![romulus64](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@romulus64](https://forum.ionicframework.com/u/romulus64)\
**Post date:** [November 8, 2017, 8:26am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/1 "2017-11-08T08:26:47Z")

</div>

Hello.  
I run my application with the **run cordova run browser** command, I was wondering how to trace / debug my project.  
The only way I found is to use the **alert** function.  
Thanks by advance.

---

<div class="post-metadata">

**Author:** ![lonelysinger1988](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lonelysinger1988](https://forum.ionicframework.com/u/lonelysinger1988)\
**Post date:** [November 8, 2017, 8:41am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/2 "2017-11-08T08:41:08Z")

</div>

Hi,

About the debug in the cordova application, you can use the Chrome to do this. It handle this case perfectly.

In the Browser, you can **Inspect Element** and take a look the **Sources** section.

In the Device, you can see the connected devices in the **Remote Devices** tab.

 ![Chrome_Debug](https://global.discourse-cdn.com/ionicframework/original/3X/b/d/bd8ef73cabd3955481a97994a3ae52a1bb88178e.png)

Thanks,

---

<div class="post-metadata">

**Author:** ![anna\_liebt](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@anna\_liebt](https://forum.ionicframework.com/u/anna_liebt)\
**Post date:** [November 8, 2017, 8:42am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/3 "2017-11-08T08:42:31Z")

</div>

Hello,  
maybe you are looking for this.

> **[Ionic Framework](https://ionicframework.com/docs/cli/serve/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

If you use chrome browser, start your debug with ionic serve, chrome starts with our app, open developer tools from brower menu.

Maybe you are looking for that

> **[Microsoft/vscode-cordova](https://github.com/Microsoft/vscode-cordova)**
>
> vscode-cordova - A Visual Studio Code extension providing intellisense, debug, and build support for Cordova projects.

Best regards, anna-liebt

---

<div class="post-metadata">

**Author:** ![romulus64](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@romulus64](https://forum.ionicframework.com/u/romulus64)\
**Post date:** [November 8, 2017, 9:09am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/4 "2017-11-08T09:09:28Z")

</div>

Hello you two.  
If I’m right, the **ionic cordova run browser** can run the application only on google chrome, despite it’s the default browser or not. My application calls web services REST, so, for technical reasons, I can’t run my program with the **ionic serve** command.  
My application calls web services REST and I mainly want to debug responses, which are json elements.  
I use Visual Studio Code in my project, can in case that might help.  
EDIT : where is the **launch.json** file, is it supposed to be in my project? I can’t find it  
EDIT2: problem solved, I was editing my code by opening the file, not the project folder, the **.vscode** was generated in my project, now I can debug my project (by selection the **Run browser** configuration).

---

<div class="post-metadata">

**Author:** ![lonelysinger1988](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lonelysinger1988](https://forum.ionicframework.com/u/lonelysinger1988)\
**Post date:** [November 8, 2017, 3:43pm UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/5 "2017-11-08T15:43:05Z")

</div>

Hi,

The easiest way is that use Chrome to make the debug although you are using browser or device. If you want to see what the response return, you only see the network tab in the Chrome. One more professional way is that you can use the Fiddler or Charles Web Proxy to trace the API request.

![Capture](https://global.discourse-cdn.com/ionicframework/original/3X/8/4/84a096dbe9200690c82d87395f43347bc3c9915c.PNG)

**ionic serve** always works well. I think there are issues in your project. Give me the log file if you fail to run the **ionic serve**. I can see what it is happening.

Thanks,

---

<div class="post-metadata">

**Author:** ![romulus64](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@romulus64](https://forum.ionicframework.com/u/romulus64)\
**Post date:** [November 9, 2017, 9:08am UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/6 "2017-11-09T09:08:40Z")

</div>

hello @lonelysinger1988, for a reason I can’t understand, I can now correctly run my project with the **ionic serve** command line, there is no trouble with calling REST web services, and thanks to this command line, I can run my project way faster. Thanks

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 10:06pm UTC](https://forum.ionicframework.com/t/trace-debug-the-application-with-cordova/111402/7 "2021-07-19T22:06:24Z")

</div>


