Installing the Tcl plug-in and running NetBeans
Ensure the NetBeans IDE is installed. See tlj1516979056448.html.
- Start the NetBeans 8.2 IDE.
- On the IDE, select Tools > Plugins. This opens the Plugins dialog box.
-
In the Plugins dialog box:
-
Select the Downloaded tab and click Add Plugins.
This opens the Add Plugins dialog box.
- Locate the Tcl plug-in .nbm file. This is located in $HCIROOT/contrib/NetBeansTcl/org-netbeans-modules-languages-tcl.nbm.
- Click OK to close the Add Plugins dialog box. Then, click Install on the Plugins dialog box.
-
Select the Downloaded tab and click Add Plugins.
- In the NetBeans IDE Installer, click Next. Accept the license and click Finish to complete the installation.
- Restart NetBeans.
- In a terminal, run setroot, then setsite to the site.
-
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. ...
-
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"
- Run NetBeans.
- Select Debug > Attach Debugger or click the tool button. This opens the Attach dialog box.
-
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.