From 85547a2a9db9035903c0861dccbbf677f7d52d92 Mon Sep 17 00:00:00 2001 From: daniel <51932404+d-buckner@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:10:43 -0800 Subject: [PATCH] Add debug documentation and configuration (#9435) * Add debug documentation and configuration Signed-off-by: Daniel Rowe * Changeset file for PR #9435 created/updated * Change step ordering Signed-off-by: daniel <51932404+d-buckner@users.noreply.github.com> * Update DEVELOPER_GUIDE.md Signed-off-by: daniel <51932404+d-buckner@users.noreply.github.com> --------- Signed-off-by: Daniel Rowe Signed-off-by: daniel <51932404+d-buckner@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Justin Kim --- .vscode/launch.json | 11 +++++++++++ DEVELOPER_GUIDE.md | 7 ++++++- changelogs/fragments/9435.yml | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 changelogs/fragments/9435.yml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..9df61a99863 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-node", + "request": "attach", + "name": "attach-to-service", + "port": 9229 + } + ] +} diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 07b884245da..3787b87b781 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -230,6 +230,11 @@ $ wsl -d docker-desktop $ sysctl -w vm.max_map_count=262144 ``` +#### Debugging +You can debug the OpenSearch Dashboards server by +1. Attaching your debugger client to the debug port on port `9229`. If you're using VSCode, you can use the `attach-to-server` debug configuration provided. +2. Running `yarn debug`. This will start the OpenSearch Dashboards development server with a debug port open on port `9229`. + ### Next Steps Now that you have a development environment to play with, there are a number of different paths you may take next. @@ -265,7 +270,7 @@ $ yarn start --run-examples #### Join the discussion -See the [communication guide](COMMUNICATION.md)for information on how to join our slack workspace, forum, or developer office hours. +See the [communication guide](COMMUNICATION.md) for information on how to join our slack workspace, forum, or developer office hours. ## Alternative development installations diff --git a/changelogs/fragments/9435.yml b/changelogs/fragments/9435.yml new file mode 100644 index 00000000000..8b6c97602e9 --- /dev/null +++ b/changelogs/fragments/9435.yml @@ -0,0 +1,2 @@ +doc: +- Add documentation and configuration for server debugging ([#9435](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9435)) \ No newline at end of file