devtools: vscode config for debugging and setting breakpoint for JEST
tests.
BUG=None
TEST=manually run debugging JEST and setting breakpoints in vscode
Change-Id: I83777e9e6a18b019fe866ba5c36e4c78184ef37c
Reviewed-on: https://chromium-review.googlesource.com/1506998
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: ShihYing Chen <shihyingchen@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>
diff --git a/devtools/test_list_editor/README.md b/devtools/test_list_editor/README.md
new file mode 100644
index 0000000..dafcf11
--- /dev/null
+++ b/devtools/test_list_editor/README.md
@@ -0,0 +1,19 @@
+<!--
+ -Copyright 2019 The Chromium OS Authors. All rights reserved.
+ -Use of this source code is governed by a BSD-style license that can be
+ -found in the LICENSE file.
+-->
+# ChromeOS Factory Developer VSCODE Configuration for Test List Editor
+
+This folder contains VSCODE configuration that are useful for ChromeOS Factory
+Test List Editor development.
+
+## Installation
+
+Copy vscode directory to ".../test_list_editor/frontend" and rename as .vscode.
+
+## Target
+* `Chrome`
+ - Set breakpoint in VSCODE and debug with Chrome browser.
+* `Jest`
+ - Set breakpoint in VSCODE and debug Jest unit tests.
diff --git a/devtools/test_list_editor/vscode/launch.json b/devtools/test_list_editor/vscode/launch.json
new file mode 100644
index 0000000..627e850
--- /dev/null
+++ b/devtools/test_list_editor/vscode/launch.json
@@ -0,0 +1,31 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "chrome",
+ "request": "launch",
+ "name": "Chrome",
+ "url": "http://localhost:8080",
+ "webRoot": "${workspaceFolder}/src",
+ "breakOnLoad": true,
+ "sourceMapPathOverrides": {
+ "webpack:///./src/*": "${webRoot}/*",
+ }
+ },
+ {
+ "name": "Debug Jest Tests",
+ "type": "node",
+ "request": "launch",
+ "program": "${workspaceRoot}/node_modules/.bin/jest",
+ "args": [
+ "--runInBand"
+ ],
+ "cwd": "${workspaceRoot}",
+ "console": "integratedTerminal",
+ "sourceMaps": true
+ }
+ ]
+}