Contributing, readme pages
This commit is contained in:
Родитель
b73a96442e
Коммит
afccb5442c
|
@ -7,7 +7,6 @@
|
|||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"program": "${workspaceRoot}/out/src/nodeDebug.js",
|
||||
"runtimeArgs": ["--harmony"],
|
||||
"stopOnEntry": false,
|
||||
"args": [ "--server=4712" ],
|
||||
"sourceMaps": true,
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# Dev setup
|
||||
Clone this repo, run `npm install` and `gulp build`, and in VS Code run the `launch as server` launch config. This will start the adapter as a server listening on port 4712.
|
||||
|
||||
Then in the debuggee, you can add `"debugServer": "4712"` to connect to your instance of the debug adapter, instead of the installed one. See [this page](https://code.visualstudio.com/docs/extensions/example-debuggers) for more details on debugging a debug adapter.
|
||||
|
||||
Since most of the code for this extension is in the [vscode-chrome-debug-core](https://github.com/Microsoft/vscode-chrome-debug-core) library, if you need to make changes, then you will probably want to clone both repos. You can run `npm link` from the `vscode-chrome-debug-core` directory, and `npm link vscode-chrome-debug-core` from this directory to make this repo use your cloned version of that library.
|
||||
|
||||
## Testing
|
||||
See the project under testapp/ for a bunch of test scenarios crammed onto one page.
|
31
README.md
31
README.md
|
@ -1,27 +1,10 @@
|
|||
# vscode-node-cdp-debug
|
||||
This is a prototype of a debug adapter for VS Code that can target Node, using the Chrome Debugging Protocol. At the moment, this is only supported in Node v7. It's based on the vscode-debug-chrome-core library.
|
||||
# VS Code Node Debug 2
|
||||
This repository contains an experimental debug extension for [node.js](https://nodejs.org) that ships with [VS Code](https://code.visualstudio.com) and uses the [Chrome Debugging Protocol](https://chromedevtools.github.io/debugger-protocol-viewer/v8/), which Node now exposes via the `--inspect` flag, only in Node versions 6.3+. It's built on the [vscode-chrome-debug-core](https://github.com/Microsoft/vscode-chrome-debug-core) library.
|
||||
|
||||
## How to run
|
||||
Clone this repo, run npm install. Open the directory in Code and press ctrl+shift+b to build and F5 to run as a debug server.
|
||||
## Contributing
|
||||
Contributions are welcome, please see [CONTRIBUTING.txt](CONTRIBUTING.txt).
|
||||
|
||||
Open your app's directory in Code and set up a launch config. It should look something like this:
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
```
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"debugServer": "4712", // To use the vscode-node-cdp-debug server, instead of vscode's built in Node debugger
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Node",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9229, // Default port, check the message printed - "Debugger listening on port X"
|
||||
"sourceMaps": true,
|
||||
"webRoot": "${workspaceRoot}"
|
||||
// "diagnosticLogging": true // May be useful for debugging
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Start your app using "node --inspect". Press F5 in Code to attach.
|
||||
## License
|
||||
[MIT](LICENSE.txt)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"vscode-chrome-debug-core": "1.0.0",
|
||||
"vscode-chrome-debug-core": "1.0.3",
|
||||
"vscode-debugadapter": "^1.12.0",
|
||||
"vscode-debugprotocol": "^1.12.0",
|
||||
"vscode-nls": "^1.0.4"
|
||||
|
|
Загрузка…
Ссылка в новой задаче