28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8. Find the trace matching your application name and select the trace level you want to use to generate output.<br />

The application name is the location (package) of the .xsapp file associated with the application you are<br />

tracing. The trace topic is named xsa: .<br />

9. Choose Finish to activate the trace level changes.<br />

9.6.3 Viewing Server-Side JavaScript Application Trace Files<br />

The server-side JavaScript API for <strong>SAP</strong> <strong>HANA</strong> XS enables you to instruct your JavaScript applications to write<br />

application-specific trace messages in the xsengine*.trc trace files, which you can view in the Diagnosis Files<br />

tab page of the Administration perspective in the <strong>SAP</strong> <strong>HANA</strong> studio. The following trace levels are available:<br />

debug, error, fatal, info, and warning.<br />

To view trace output for your server-side JavaScript application, perform the following steps:<br />

1. Open the <strong>SAP</strong> <strong>HANA</strong> studio.<br />

2. In the Navigator view, double-click the <strong>SAP</strong> <strong>HANA</strong> instance to open the Administration view for the repository<br />

where your server-side JavaScript source files are located.<br />

3. Choose the Diagnosis Files tab page.<br />

4. In the Filter box, enter a string to filter the list of search files displayed, for example, xsengine*.trc.<br />

The timestamp displayed in the Modified column does not always reflect the precise time at which the trace<br />

file was written or most recently modified.<br />

5. Locate the trace file for your <strong>SAP</strong> <strong>HANA</strong> XS application and doubleclick the entry to display the contents of<br />

the selected trace-file in a separate tab page.<br />

9.7 Debugging JavaScript<br />

<strong>SAP</strong> <strong>HANA</strong> studio enables you to debug XS JavaScript files, including setting breakpoints and inspecting<br />

variables.<br />

Caution: A port must be opened to enable debugging. For security reasons, the debug port is turned off by<br />

default.<br />

1. In a browser, run the XS JavaScript source file that you want to debug.<br />

2. Create a debug configuration for debug sessions for a specific <strong>SAP</strong> <strong>HANA</strong> installation.<br />

a) Open the Debug perspective.<br />

b) Choose and select Debug Configurations.<br />

c) Create a new XS JavaScript configuration by double-click XS JavaScript.<br />

d) Enter a name for the configuration.<br />

e) Enter the host and debug port for your <strong>SAP</strong> <strong>HANA</strong> system.<br />

f) Select Apply.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Writing Server-Side JavaScript Applications<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 225

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!