This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone,
when designing a GUI with the GUI Composer Plugin of CCS, I ever so often make some small mistakes in the Javascript code (typo in function name, missing semicolon, etc). In these cases, the GUI will not work properly but I do not get an error message of any kind, which makes it hard to track the mistake down.
Is it possible to somehow display errors produced by the Javascript code of the GUI? Preferably directly inside CCS but I am also open to other methods, if this is not directly possible.
I am using CCS v6.1.2.
Best, Felix
Felix,
Sorry about the delayed reply.
Have you had a look at this wiki page? http://processors.wiki.ti.com/index.php/Advanced_Application_Debugging_-_GUI_Composer
Felix,
After you add -Dremote_debugging_port=8080 in ccstudio.ini file and restart CCS by running the ccstudio.exe, you should be able to open chrome browser and enter localhost:8080 in the address bar to remote attach chrome browser to debug an internal chromium browser within CCS.
If your PC has port 8080 blocked by the firewall, try changing it to something else. i.e 9191.
Patrick
Hi Patrick,
it is still not working. Maybe I am missing something. This is what I did:
I also tried it with different port numbers but with the same result.
Hi Felix,
It looks like the wiki page incorrectly documented the wrong variable name, please try to use "cef_remote_debugging_port=8080". You can put this line anywhere after "-vmargs". I'll try to get the wiki page updated.
Patrick
Hi Patrick,
thanks, now it is working!
One follow-up question on this: Is it possible to access things like $TI or functions/variables defined in app.js in the debugger console? I would like to interactively play around a bit but when I, for example, execute $TI.GUIVars.getValue("test") in the console, I only get the error "ReferenceError: $TI is not defined".
Best, Felix
I am using the preview mode but it does not work. I will describe what exactly I am doing, maybe I am doing something wrong.
When I run the GUI inside CCS (preview mode) and open localhost:9191 (I set to port number to 9191) in Chrome, I get the following text:
Inspectable WebContents
There I click on the "Preview" link which opens the Developer Tools. When I open the "Console" tab I see javascript error messages caused by syntax errors (which is already very helpful!), but I cannot access $TI or anything from app.js.
I noticed, that in the elements tab, I do not see app.html directly but only a simple HTML page that includes app.html via an iframe:
Could this be the problem, that the app.html itself is not directly running in the debugger?
I also get the following error several times in the console tab:
Blocked a frame with origin "http://127.0.0.1:7272" from accessing a frame with origin "file://". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Protocols must match.