Available tools

When you run a configuration in debug mode, EDT automatically starts the debug server (based on the selected launch configuration) and selects the HTTP protocol for debugging the client application. EDT does not support debugging over TCP/IP.

Upon reaching a breakpoint, EDT opens the Debug perspective. It includes the following views:

  • Debug. Displays available debug items and the current execution stack.
  • Variables. Displays all variables available in the current module. Variables are divided into three groups:
  • Module properties. The local module context. For example, a form module local context includes all of the form properties and attributes.
  • Module variables. Variables declared in the module.
  • Parameters and variables of the method being executed.
If a variable is not yet initialized, it has <undefined> value.
  • Breakpoints. List of breakpoints available in the workspace. To enable or disable a breakpoint, select or clear the checkbox next to it.
  • Expressions. Use this view to specify expressions that are calculated at each debugger step. You can enter an expression manually or right-click anywhere in the Expressions view and then click Add Watch Expression.
  • Values. You can use this view to view collections. To add a collection to this view, right-click the collection in the Variables view and then click Show in Values. The Link with Variables button defines whether the content of the Values view depends on the selection in the Variables view. If you enable Link with Variables, clicking variables in the Variables view changes the content of the Values view. If you disable Link with Variables, clicking the variables in the Variables view does not change the Values view.

During the debugging you have the option to view variable values directly in 1C:Enterprise script editor. To view the value of an object or property, move the pointer over it. To view an expression value, select the expression, right-click it, and then click Inspect.

To change a variable value directly in the debugger, in the Variables view, right-click a variable and click Change Value  (this opens a dialog box where you can change the value), or click and edit it in the Value column. The dialog box provides the option to change not only the value but also the variable type, while the Values view only allows you to change the value.

You can use the "inline debugging" mode to simplify debugging. To enable or disable this mode, use the toolbar button. In this mode EDT displays the current values of local variables in each script line. For example, if your module contains line a = b + c; EDT displays the values of a, b, and c in this line.

Let us review the sequence of debug operations that starts upon reaching a breakpoint. Once a debug server receives a notification that a debug item reached a breakpoint, it sends requests to pause the execution to all attached debug items (they are listed in the Debug view of the Debug perspective). The debug items execute this command before the execution of the next script line. The attached debug items are paused asynchronously. Only the current session debug items (the client application and its server counterpart) are paused synchronously, while the moment of pausing other debug items generally cannot be predicted. Then, once you execute a command in EDT debugger (for example, make a step), the debug server notifies all of the attached debug items that they can resume their execution. The specified command is executed in the active debug item. Note that the "step over" command is roughly equal to running the debug item with a breakpoint set on the next line. Once the active debug item executes the operation, it notifies the debug server about that, completing the cycle.

This procedure applies the following limitations:

  1. The parallel step-by-step debugging of several debug items connected to a single Infobase (in client/server mode) or to a single debug server (in file mode) is impossible.
  2. In general, if you make a single step in a module being debugged, you cannot predict the exact points where all of the attached debug items will be paused.
The next chapter: Chapter 3. 1C:Enterprise Development Tools setup

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.