Tutorial – How to DEBUG Suitescript using Google Chrome

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.

Google chrome is a browser that comes with a debugging feature for javascript. This 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 ‘page icon’ in the upper-right corner of the browser. Navigate to Developer > 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 (duh). 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.

No related posts.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>