Installing the Tcl plug-in and running NetBeans

Ensure the NetBeans IDE is installed. See tlj1516979056448.html.

  1. Start the NetBeans 8.2 IDE.
  2. On the IDE, select Tools > Plugins. This opens the Plugins dialog box.
  3. In the Plugins dialog box:
    1. Select the Downloaded tab and click Add Plugins.
      This opens the Add Plugins dialog box.
    2. Locate the Tcl plug-in .nbm file. This is located in $HCIROOT/contrib/NetBeansTcl/org-netbeans-modules-languages-tcl.nbm.
    3. Click OK to close the Add Plugins dialog box. Then, click Install on the Plugins dialog box.
  4. In the NetBeans IDE Installer, click Next. Accept the license and click Finish to complete the installation.
  5. Restart NetBeans.
  6. In a terminal, run setroot, then setsite to the site.
  7. Start hcitpstest:
    $ hcitpstest -P 1234 -r run -a -x ASCII -f nl -c sms_ib_data 
    -e "hcitpstestshowbydisp " $HCISITEDIR/in.txt "mytest"

    -P specifies the listening port.

    This results in the message:

    File cis_site/cis19.1/integrator/t-dtc/exec/debugger/cludport.37481 is created.
    Listening on port 1234.
    ...
  8. Add -C "tcl_scripts" to evaluate Tcl scripts before the debugged proc is run.

    For example, you can use -C "source myproc.tcl" to load another Tcl file myproc.tcl in which a proc to debug is defined:

    $ hcitpstest -C "source myproc.tcl" -P 1234 -r run -a -x ASCII -f nl 
    -c sms_ib_data -e "hcitpstestshowbydisp " $HCISITEDIR/in.txt "mytest"
  9. Run NetBeans.
  10. Select Debug > Attach Debugger or click the tool button. This opens the Attach dialog box.
  11. In the dialog box, in Debugger select CLUD - Tcl.
    For Target, specify the host name and port number. For example, hostname:1234.
    File mytps.tcl is opened and the program stops at the first line of proc mytest. Now you can set breakpoints, step through the code, check call stack, and change variable values.