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