From c3dd9d7e26405e1ad0a6bb49ea7fd1ee80a8768f Mon Sep 17 00:00:00 2001 From: Antoine Tremblay Date: Fri, 16 Jun 2017 07:59:05 -0400 Subject: [PATCH] Update the debug documentation. This patch updates the debug documentation following the addition of the Launch Frontend configuration for vscode. Signed-off-by: Antoine Tremblay --- doc/Developing.md | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/doc/Developing.md b/doc/Developing.md index 11322d83511fc..50033ab63d849 100644 --- a/doc/Developing.md +++ b/doc/Developing.md @@ -114,13 +114,37 @@ by this command. To debug an example using VSCode: -- Uncomment the "sourceRoot" property in theia/tsconfig.json. -- Rebuild the example as described [here](#rebuilding-the-example). -- Start the debug tab and run the program, this will start the backend - process. -- Start the frontend using: +### Debug the browser example's backend - npm run start:frontend +- Start the debug tab and run the `Launch Backend` configuration. + +### Debug the browser example's frontend + +- Start the frontend using `npm run start:frontend` +- Start the debug tab and run the `Launch Frontend` configuration. + +### Debug the browser example's frontend and backend at the same time + +- create a symlink to theia directory `ln -s theia theia-frontend` +- Open one vscode in theia directory. +- Open another vscode in theia-frontend directory. +- In one vscode window: start the debug tab and run the `Launch Backend` configuration. +- In the other vscode window: start the debug tab and run the `Launch Frontend` + configuration. + +### Debug the electron example + +This one you can build as usual with `npm run build` and then use Chrome's +dev tools to debug. + +There's an issue debugging with vscode it seems electron runs at 100% and +debugging doesn't work. + +### Issues + +Note that we should be able to debug both frontend and backend in one window but I've this +[this issue](https://github.com/Microsoft/vscode/issues/28817) when trying +that. tl;dr Some breakpoints don't hit. ## tl;dr