Trace/debug the application with cordova

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.


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.


maybe you are looking for this.

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

Best regards, anna-liebt

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).


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.


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.


1 Like

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