Connor Peet 08ed2b692a debug: allow debugging the renderer process (#100242)
* debug: allow debugging the renderer process

This adds a new parameter to the `launchVSCode` request --
`debugRenderer`. If set to true and we're in Electron, the main process
will attempt to stand up a CDP-speaking server and respond with the port
the debugger can connect to in order to handle debug events.

Note: this only works when webviews are iframe-based. It's _possible_
to do the same treatment to webviews with greater complexity. I didn't
implement that today, and maybe we say since iframes are coming
eventually (and they can be toggled on with a user setting that we could
have in the starter...) we don't need do add handling for that.

This does not work when debugging in web because there's no way to
force the browser to enter debug mode.

Code in this PR is still rough, I will keep this in PR until
I have js-debug working end to end and iron out any kinks.

* fixup! adopt new api

* webviews: add 'purpose' flag and extension ID to iframe webview uri

The `purpose` can be used for notebooks instead of the extension ID,
since there's no extension associated with the renderer view.

The renderer URL now looks like:

```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=&purpose=notebookRenderer
```
And a renderer is:

```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=connor4312.vsix-viewer&purpose=undefined
```
I wanted to put this in the page title, but unfortunately this is hard
due to https://bugs.chromium.org/p/chromium/issues/detail?id=1058108.
Instead, add it to the url which _is_ available and given in
the first targetInfoChanged event.

Co-authored-by: Andre Weinand <aweinand@microsoft.com>
2020-06-25 11:54:36 -07:00
2020-06-24 10:58:45 -07:00
2020-06-25 17:34:12 +02:00
2020-06-25 14:21:23 -04:00
2020-06-24 22:00:03 +02:00
2020-06-21 13:53:16 -07:00
2018-12-19 09:10:53 -08:00
2020-03-02 15:30:43 +01:00
2020-06-25 19:25:49 +02:00
2019-12-30 10:15:02 -08:00
2019-03-18 15:13:14 +00:00
2020-06-19 11:12:28 -07:00
2020-04-27 17:37:52 -07:00
2020-06-19 11:12:28 -07:00
2019-07-02 15:38:23 +02:00
2020-06-25 10:59:28 -07:00
2020-06-02 10:27:38 +02:00
2020-06-24 22:00:03 +02:00

Visual Studio Code - Open Source ("Code - OSS")

Build Status Feature Requests Bugs Gitter

The Repository

This repository ("Code - OSS") is where we (Microsoft) develop the Visual Studio Code product. Not only do we work on code and issues here, we also publish our roadmap, monthly iteration plans, and our endgame plans. This source code is available to everyone under the standard MIT license.

Visual Studio Code

VS Code in action

Visual Studio Code is a distribution of the Code - OSS repository with Microsoft specific customizations released under a traditional Microsoft product license.

Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.

Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on Visual Studio Code's website. To get the latest releases every day, install the Insiders build.

Contributing

There are many ways in which you can participate in the project, for example:

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

Feedback

Many of the core components and extensions to VS Code live in their own repositories on GitHub. For example, the node debug adapter and the mono debug adapter have their own repositories. For a complete list, please visit the Related Projects page on our wiki.

Bundled Extensions

VS Code includes a set of built-in extensions located in the extensions folder, including grammars and snippets for many languages. Extensions that provide rich language support (code completion, Go to Definition) for a language have the suffix language-features. For example, the json extension provides coloring for JSON and the json-language-features provides rich language support for JSON.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.

Description
Languages
TypeScript 75%
jsonc 20.6%
CSS 1.2%
JavaScript 0.8%
C 0.7%
Other 1.4%