Overview:
This is a guide on how to use the google chrome browser as a debugger for Netsuite's suitescript. It will also show the great feature that the browser has when debugging a suitescript.
Answer/Solution:
Google chrome is a browser that comes with a debugging feature for javascript. Here is a tutorial on how to use the debugging capability of google chrome:
1. You can download and install the browser on this link: http://www.google.com/chrome
2. Login to your Netsuite account using the Google Chrome browser.
3. Load a sample Employee record for testing. List > Employees > Employee. Select at least one employee.
4. Click the three lines icon in the upper-right corner of the browser. Navigate to Tools > Developer Tools (shortcut: Ctrl + Shift + I).
5. A separate window will open. This is the Debugger console. Click the Script tab.
6. In the Console window you can now try the Suitescript API. Here a sample nlapiLoadRecord is being test, as you type in Google Chrome has an intellisense feature that would predict the API that you ought to use.
7. After executing the nlapiLoadRecord, the debugger will show the return object. It will show the entire hierarchy to show the fields, sublist, etc. and it's corresponding values.
Advantage of using Google chrome
- The debugger is a built-in feature in the browser. Unlike firefox's firebug which comes as a plug-in.
- Ability to have an 'intellisense' feature while inputting the suitescript in the console.
- For every successful execution it will return the object based on the script. The result is presented in hierarchy and shows all the fields and values.
- Save time in debugging. The script can run in real-time, just execute it in the console. No need to deploy the suitescript.
- The console can be tested for suitescript's either client or server-side script.
Google Chrome Version 24.0.1290.1
No comments:
Post a Comment