tree: 4917400e3f68e26b382d0843695ee4b548aef219 [path history] [tgz]
  1. e2e/
  2. lib/
  3. src/
  4. tests/
  5. third_party/
  6. tools/
  7. CMakeLists.txt
  8. README.md
  9. tsconfig.json
extensions/cxx_debugging/README.md

Chrome DevTools C/C++ Debugging Extension

This extension enables debugging capabilities in DevTools for C++ programs compiled to WebAssembly.

Build the extension

Note: Currently, the extension supports only Linux builds.

Some of the extension's dependencies are not checked out by default together with devtools-frontend. To enable the dependencies:

  1. Set the checkout_cxx_debugging_extension_deps flag to True in your .gclient config. For example:

    solutions = [
     {
       "name"        : "devtools-frontend",
       "url"         : "https://chromium.googlesource.com/devtools/devtools-frontend",
       "deps_file"   : "DEPS",
       "managed"     : True,
       "custom_deps" : {
       },
       "custom_vars": {
         "checkout_cxx_debugging_extension_deps": True
       },
     }
    ]
    
  2. Make sure to update the dependencies. Run:

    gclient sync
    
  3. Run the extension's two-stage build from the same directory:

    ./tools/bootstrap.py -debug ../../out
    

This creates two output directories in the out folder:

  • DevTools_CXX_Debugging.stage1 that contains some native binaries required for the second build stage.
  • DevTools_CXX_Debugging.stage2 that contains the built extension.

To get an overview of all available build options, run ./tools/bootstrap.py -help.

Run the extension

You can load the extension to Chrome directly from the DevTools repository root with the following command:

third_party/chrome/chrome-linux/chrome --load-extension=$PWD/out/DevTools_CXX_Debugging.stage2/src

Test front-end

The extension contains TypeScript and general front-end components, which are tested via karma-based tests located in the tests/ folder. They follow the foo_test.ts naming convention used in DevTools front-end.

These tests are automatically run by default by tools/bootstrap.py unless you pass the -no-check argument there.

To explicitly execute them, run the ninja check-extension in the stage2 output directory.