Skip to content

Commit 001e4b8

Browse files
committed
Create CONTRIBUTING.md
1 parent f159f45 commit 001e4b8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
To get the extension running locally:
4+
5+
```
6+
git clone https://github.com/laravel/vs-code-extension.git
7+
cd vs-code-extension
8+
npm install
9+
```
10+
11+
- Open the project in VS Code
12+
- Open the command palette and search for "Debug: Start Debugging"
13+
- A new VS Code window will open, you'll see "[Extension Development Host]" in the title
14+
- Open any folder you'd like to test against
15+
- Press `⌘ + R` to reload the Extension Development Host project and see changes
16+
17+
## Of Note
18+
19+
- `console.log` will appear in your main VS Code "Debug Console" tab, _not_ the Extension Development Host window
20+
- `info`, `error`, etc from `src/support/logger.ts` will show up in the "Output" tab (make sure to select "Laravel" from the list) of your Extension Development Host window
21+
22+
## Testing the Parser
23+
24+
The [PHP parser](https://github.com/laravel/vs-code-php-parser-cli) is a standalone binary that parses the PHP scripts for item detection and autocomplete.
25+
26+
If you are making changes to the parser, follow the setup instructions from that repo and create an `.env` file at the root of the `vs-code-extension` with the full path to this variable set:
27+
28+
`PHP_PARSER_BINARY_PATH=[FULL PATH TO DIRECTORY]/vs-code-php-parser-cli/php-parser`
29+
30+
If you make changes to your `.env` file, you'll have to close the Extension Development Host and start debugging again.

0 commit comments

Comments
 (0)