Skip to Content
Author's profile photo Former Member

JavaScript Debugging in NWBC

While working on a project where we are using NWBC Client with UI5 Applications, some custom and some standard, we were unable to debug the JavaScript and see the JavaScript console for the UI5 Applications when they were running in the NWBC client as the F12 Developer tools are deactivated when Internet Explorer is used as an embedded control.

Thanks to Simon Kemp for finding the solution to this problem in this discussion: Use browser debugging tools in the NWBC side panel? and in this external link: Debugging JavaScript in a WebBrowser Control from VS2010 | Mark Leighton Fisher []

So I thought I would document the following steps to help others facing this issue.

1. Download Visual Studio 2013 free Community edition here: Visual Studio 2013 Free Community Edition

Screenshot 2014-12-17 17.37.12.png

2. Hold the control key and go to Help->Tools->IE Settings Dialog in the NWBC Client.


3. Make sure the “Disable script debugging” checkboxes for both Internet Explorer and Other are not checked and that “Display a notification about every script error” is enabled as shown in the highlighted options below.


4. Make sure that NWBC is open and open Visual Studio 2013. In Visual Studio go to DEBUG->Attach to Process…


5. Select NWBC.exe and press Attach.


6. Here you will see the open Internet Explorer sessions within NWBC.


7. If we open a new tab with a custom UI5 Application you will notice another Internet Explorer session appears and you can see the code and console messages in the output section below when the “JavaScript Language Service” dropdown option is selected.


8. Changing the “JavaScript Language Service” dropdown option to “Debug” you can see all the JavaScript errors.


9. For some reason which I am not sure of, you are unable to debug and step through by setting break points in the code above. In order to debug your code you will need to add in a debugger; statement into your code as shown below. This unfortunately is not an option if its a SAP standard UI5 Application.


10. Now when this UI5 Application is opened via NWBC it will stop in the Visual Studio Debugger as shown below.


11. You can now use the Visual Studio Debug controls shown below to debug your JavaScript code.


If anyone manages to find out a way to debug SAP Standard UI5 Javascript code without needing to put in the debugger; statement I would love to know.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Simon Kemp
      Simon Kemp

      As usual good useful stuff Brad. Just to add a little and to answer your question (of course you already know this but adding here for everyone else) you can debug the SAP standard code by inserting a "debugger" statement on the fly into the code using Fiddler as described here

      I have successfully used the bpafter index.html to add a debugger statement into the index.htm page.



      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Simon. Very cool trick and useful link 🙂



      Author's profile photo Rainer Betrich
      Rainer Betrich

      Hi Simon, Hi Former Member -> turning browser debug Tools in SAP BC 6.5 using <Ctrl>-Tab ist still working. Spend a lot of time to get that valuable Information.