VS Code Extension Features

Advanced stepping functions

Step to the target of functional objects

When performing step into command at the point of call to functional objects such as std::function, SLDB jumps directly into the target of functional object, stepping through the code from the standard library.

As shown in the example, SLDB steps directly to the target of the std::bind result and back, skipping all auxilary code from the standard library.

Image
Image

Skip standard functions

When performing step into and step out commands, SLDB detects and skips functions from the standard library, stepping only into functions defined in user code.

As shown in the example, SLDB skips v.begin() and v.end() calls, and steps directly into the process function.

Customize step behavior

You can customize the lists of regular expressions that SLDB uses to detect the standard library functions when performing step commands. This feature allows you to apply advanced SLDB stepping functionality with third party libraries and user-defined functional objects.

The example demonstrates stepping though user defined my_functor functional object. To make it work you need just add ^my_functor::* regular expression into step settings.

Image

Debugging functional style programs

Image

Display values of lambda expressions

SLDB has builtin support of displaying the values of lambda expressions. You can see not only the values of captured variables, but also the name of target lambda expression.

The example shows displaying of user defined lambda expression assigned to the lambda variable.

int z;
auto lambda = [z](int x, int y) -> auto {
    return x + y + z;
};

auto res = lambda(10, 20);

Display values of the standard functional objects

SLDB can display the values of the standard functional objects and related classes such as results of the std::bind function. For a result of the std::bind call, SLDB displays not only the target function, but also bound arguments and placeholders.

The example shows displaying of result of the std:bind call wrapped into the std::function object.

void foo(int x, int y) {
    ...
}

std::function<void(int)> bf = std::bind(&foo, _1, 10);
bf(20);
Image

libstdc++

The GNU C++ Library

libc++

The LLVM/Clang C++ Library

Full support of the standard library

SLDB can display values of all types from the standard library. Both libstdc++ and libc++ libraries are supported. Click on the button below to see the complete list of supported types.

  • Strings
  • Simple containers
  • Associative containers
  • Functional objects
  • Smart pointers
  • Utility classes
Learn More

Other Features

Android debugging

SLDB supports debugging on local Android device or emulator via the android platform plugin. You just need to select the android platform and specify application ID and activity name to launch. See more details in the Android debugging section in the documentation.