29.11.2015, 23:11 | #1 |
Участник
|
Microsoft Dynamics CRM Team Blog: Debugging custom JavaScript code in CRM using browser developer tools
Источник: http://blogs.msdn.com/b/crm/archive/...per-tools.aspx
============== You can use JavaScript in Microsoft Dynamics CRM to perform actions in form scripts, command bar (ribbon) commands, and web resources. More information: Use JavaScript with Microsoft Dynamics CRM Each browser provides you with a debugging tool to help you debug your custom JavaScript code natively in the browser. Typically, you activate debugging in your browser by pressing the F12 key to display the native developer tool used for debugging. In This Post Debugging your JavaScript code for CRM web client Debugging your JavaScript code for Interactive Service Hub client Debugging your JavaScript code for CRM mobile clients Browser Developer Tools Reference Debugging your JavaScript code for CRM web client When you use a custom JavaScript library with the CRM web client, the library is loaded with the page, and you can view it in the browser developer tools to set break points, and examine the variables as the code executes to debug your JavaScript code. For example, on Microsoft Edge, the custom JavaScript library becomes available in the Debugger tab. On Google Chrome, the custom JavaScript library is available in the Sources tab. For more information, see Debugging JavaScript in Microsoft Dynamics CRM. Debugging your code for Interactive Service Hub client When you use a custom JavaScript file or library with the new Interactive Service Hub client (introduced in CRM 2016), instead of loading your custom JavaScript library with the web page, CRM dynamically injects the contents of the custom JavaScript library in a dynamic library in the app. Developers cannot set break points on their custom code because every time the page is reloaded, the custom JavaScript code is injected into one of the dynamic libraries which will prevent the specified break point to be hit. In this case, you could use any of the following techniques to debug your dynamic JavaScript code. Please be aware that this is not a comprehensive list, but provides some of the ways that can be helpful in debugging your dynamic JavaScript code. All the methods listed below might not work the same across all the browsers supported by CRM, and you must research around to see what suits best as per your requirement.
As with the Interactive Service Hub client, CRM injects your custom JavaScript code into one of the dynamic libraries, so you face the same challenge in debugging your code. However, the instructions to debug code for CRM mobile clients are different than the Interactive Service Hub client. For more information, see Debugging scripts for CRM for tablets. Browser Developer Tools Reference Developer Tools in Microsoft Edge Developer Tools in Microsoft Internet Explorer Developer Tools in Google Chrome Developer Tool in Mozilla Firefox Developer Tools in Apple Safari (Web Inspector) Microsoft Dynamics CRM SDK Documentation Team Источник: http://blogs.msdn.com/b/crm/archive/...per-tools.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|