Quantcast
Channel: SCN : Blog List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 676

Debug XSJS Using HANA Studio Step By Step

$
0
0

Hi Folks,


When I was trying to debug and facing problem I went through many blog posts and didn't find even a single post which gave all the steps needed to debug XSJS. Hence I am writing one and hoping someone is happy to see this.



     1. To be able to debug you will require following debugger role to your HANA ID:

          sap.hana.xs.debugger::Debugger    


     2. Create Debug Configuration for your XS project.

debug01.png

debug02.png

debyug03.png

     Click on Apply/Save button to save the debug configuration.


     3. Now create breakpoints wherever you want to debug. You can create breakpoints by double clicking on left most side of the code line.

debug04.png

     4. Now run your project in a web browser(preferably in Google Chrome). When your XS application runs a unique session id will be generated . The             session id can be seen by opening Develeoper tools of web browser. Press "F12" to open developer tools and note down the session id.

sess.png

     5. Now go to HANA Studio and start debugging. Select your project and click debug icon and select the debug configuration you created in earlier                   stage.


a.png

     6. Once you start debugging HANA studio will ask which session to debug hence you will have to select a session which you noted down in earlier                 stage.

a.png


     7.
Now go to the web browser where your application is running and you noted down session id. Just go to the point where you want application to go in debug         mode/ to the point where you create breakpoints.

        Once the break point reaches you will see in HANA studio a green line indicating debug mode.

final.png



I hope it will help someone.


--

Regards,

Rauf


   


Viewing all articles
Browse latest Browse all 676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>