Enabling this is required for rules that need to use the types as resolved by the TypeScript compiler. The no-floating-promises rule was missing some stuff due to missing types, so this CL resolves that too. Also, return-await kicked up more stuff. A warm run of `npm run lint` went from ~23s to ~35s on my M1 Mac. Bug: 406518012 Change-Id: I0c413e2ca14ee903851fd8404e490335c7f8aae0 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6397499 Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
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:
-
Set the
checkout_cxx_debugging_extension_depsflag toTruein your.gclientconfig. 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 }, } ] -
Make sure to update the dependencies. Run:
gclient sync -
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.stage1that contains some native binaries required for the second build stage.DevTools_CXX_Debugging.stage2that 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
Unittests
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.
E2e tests
There are e2e tests, found in the e2e/ directory, which test the entire flow, from compiling a project with debug
symbols to running it in chrome and debugging it with devtools with the extension.
Running the e2e tests requires a special build which includes also building devtools-frontend and compiling the test projects with emscripten. To do that, use:
./e2e/runner.py run --build-root ../../out/e2e --v -C
The -C argument is only necessary on the first run in order to fully compile everything once. Subsequently it can be left out to run a little bit faster.