From a04220d1aaa27a05683d611c7e084bc54e9dbfbd Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Tue, 19 Feb 2019 00:18:26 -0500 Subject: [PATCH] Updated readme with brsconfig.json information. --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d04db0c..62dd1775 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ A VSCode extension to support Roku's BrightScript language. [![GitHub](https://img.shields.io/github/release/twitchbronbron/vscode-brightscript-language.svg?style=flat-square)](https://github.com/twitchbronbron/vscode-brightscript-language/releases) ## Features +- Static analysis (code validation) - Syntax highlighting - Code formatting (provided by [brightscript-formatter](https://github.com/TwitchBronBron/brightscript-formatter)) - Debugging support - Set breakpoints, launch and debug your source code running on the Roku device all from within VSCode @@ -40,7 +41,23 @@ Your project must be structured in the way that Roku expects, which looks someth - source/ - main.brs -Here is a sample launch configuration +If your project lives in a subdirectory, you will need to create a `brsconfig.json` file at the root of your project, and reference your subdirectory like such: + +```json +{ + "rootDir": "./someSubdir" +} +``` + + +This project relies heavily on the [brightscript](https://github.com/twitchbronbron/brightscript) project for language server support. See [this link](asdf) for all all of the supported options in the `brsconfig.json` file. + + +## Debugging + +This extension supports launching and debugging your local project on a Roku device. In order to do this, you will need to create a `launch.json` configuration file. + +Here is a sample `launch.json` file where your roku project lives at the root of your workspace: ```json @@ -90,6 +107,10 @@ then you would need change `rootDir` in your launch config to look like this: } ``` +### Using both `launch.json` and `brsconfig.json` + +When launching a debug session, this extension will first read all configurations from `brsconfig.json`. Then, it will overwrite any options from the selected configuration from `launch.json`. So, it is advised to keep all common settings in `brsconfig.json`, and only add values you wish to override in `launch.json`. + ## Special Cases ### Debug source files with Custom build process