Click or drag to resize

Debugging

Wisej applications support full debugging of the server side and the client side JavaScript code. You can debug the server code in Visual Studio, while running the application, and at the same time debug the client side code in the browser.

If you use IE to preview the application, you can debug the JavaScript code in Visual Studio as well.

Start in Debug Mode

Select the browser that you want to use and click the Run button.

browsers-debugging-menu

You can place breakpoints and watch variables anywhere in your code, just as you'd debug a regular desktop application.

Enable Debug Mode

There are three settings in Wisej related to debugging:

  • <compilation debug="true">

    Visual Studio usually sets this property to true automatically when launching the application in debug mode. When debug=true, minification is disabled. You will be able to see and debug the source JavaScript code for all the Wisej client side widgets.

  • "debug": true in Default.json

    When this option is set to true, Wisej logs all sorts of events to the browser's console. However, this is limited to the log events generated by Wisej's client side code.

  • "options": {"debug": true} in Default.json

    When the debug value of the options map is set to true, Wisej enables the debug mode in the qooxdoo framework. It simply means that you will see a lot more log events in the browser's console.

Debug in Chrome

When using Chrome you can debug Wisej and your JavaScript code and the document model by pressing F12.

Wisej JavaScript Source

Select Sources, then expand the resources.qx and select Wisej.js?v=x.x.x.x. This is the entire bundled JavaScript, including any custom JavaScript you may have added and all extensions, generated by Wisej.

In case it is minified, make sure that the debug property in Web.config is set to true.

browser-developer-tools

Qooxdoo JavaScript Source

Select qx.js,Wisej.Web?v=x.x.x.x to load the full qooxdoo source code. You can place breakpoints anywhere, as you would do when debugging any JavaScript code.

You can also interact directly with the widgets in the browser from the JavaScript console. All the widgets creates by Wisej are registered with the browser under the App namespace. For example, your top level window named "CustomerForm" is available to JavaScrip as App.CustomerForm. For more information, see the JavaScript Object Model page.

Network Traffic

To view the network traffic generated by Wisej, select Network, then either select All or WS (for WebSocket traffic only).

If you are using a WebSocket connection, you may have to refresh the page to let the browser attach to the connection. The select the last entry app.wx?url=... to see the WebSocket frames.

Note Note

If a WebSocket frame is displayed as Binary Frame (Opcode 2) and you cannot see the content, it means that it has been compressed by Wisej. You can disable WebSocket compress by adding "enableWebSockeCompress": false to the application's configuration file.

See Also