Is it possible to debug in Javascript in outsystems mobile development ?

Is it possible to debug in the javascript code using outsystem service studio.?

simply no on-device at least but on browser you can play with Console

depends.

you could put "alert" on your javascript code to view the data.

also like assif said, if you use run on browser, you can view it on developer tools

Manish Kumawat wrote:

Is it possible to debug in the javascript code using outsystem service studio.?


I have a scenario like. 

I used a javascript code in a client action.

My Question is -> can I use break point in the javascript code shown in the picture. to check the values at runtime.


Manish Kumawat wrote:

Manish Kumawat wrote:

Is it possible to debug in the javascript code using outsystem service studio.?


I have a scenario like. 

I used a javascript code in a client action.

My Question is -> can I use break point in the javascript code shown in the picture. to check the values at runtime.


Hi Manish,


You cannot use breakpoint inside a javascript block,

if you want to debug a JS block, you can use console log to print logs or you can use alerts to show the result you want or else you can debug your js block in chrome devloper tools.

Hope you got it...:)


Hi Manish,

You can add debugger statement in you js block on the place you want to pause the execution. Statement example is below for your reference.


Your js statement;

debugger;

Next js statement;

Dear Manish,

I can see a similar question about JavaScript debug from your side in below thread.
https://www.outsystems.com/forums/discussion/55982/can-i-debug-in-javascript/

If you need any more information on the same question, I would suggest you to provide more information on the any same thread.

This will help all other community members to focus on single question.
If later you found any solution on that question, please mark it as resolved.
So later if any other member is having same issue/question, they can find it easily on community.

Hope you understand my concern.

Thanks & Regards,
Palak Patel

Nikhil Gaur wrote:

Hi Manish,

You can add debugger statement in you js block on the place you want to pause the execution. Statement example is below for your reference.


Your js statement;

debugger;

Next js statement;


Hi Manish,

While using debugger keep in mind that your code will pause on debugger statement only when you have dev tools (page inspect) open in your browser and because of this you can only use debugger while running app in browser.

Hi Manish,

You already have some answers to your question here. What I advise you, and where you can find a lot of information on how to debug and troubleshoot Mobile applications, is to read the following documentation. Here, you'll find everything you need to know... I hope it helps you a lot.

Cheers,

Nuno Verdasca

Hello all,

To debug an OutSystems mobile application running in the phone, using Chrome perform the following steps:

1. Connect your phone with USB cable to your computer.

2. Start the App you want to debug.

3. Start Chrome and open the Dev Tools.

4. Select in the DevTools window in the menu More Tools and then Remote Devices, then next panel is shown:

5. Check Discover USB Devices, then after some seconds the screen will update to something like this, notice between the text Devices and Settings it mentions my phone and that the browser is connected to it.

6. Click on the text Connected, the following will be shown:

7. Click on the Inspect button on the right to start the debugging session. 

You can use all the featuers of Chrome DevTools, inspect the DOM, set breakpoints in javascript, inspect local storage, session storage, IndexedDB tables, etc.

While you do this the screen of your phone is also rendered in the browser.

Regards,

Daniel


HI Daniel,

Thanks for sharing, I have not tried it yet but will surely try this out.