Skip to content

Commit

Permalink
Replace all instances of the deprecated workspaceRoot with workspaceF…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
roblourens committed Mar 22, 2018
1 parent c7b5155 commit 797ca80
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 54 deletions.
12 changes: 6 additions & 6 deletions Angular-CLI/README.md
Expand Up @@ -50,23 +50,23 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceRoot}"
"webRoot": "${workspaceFolder}"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9876/debug.html",
"webRoot": "${workspaceRoot}"
"webRoot": "${workspaceFolder}"
},
{
"name": "ng e2e",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"protocol": "inspector",
"args": ["${workspaceRoot}/protractor.conf.js"]
}
"args": ["${workspaceFolder}/protractor.conf.js"]
}
]
}
```
Expand Down Expand Up @@ -115,7 +115,7 @@ You can also debug your end-to-end tests running in Protractor with VS Code.
1. Start your local web server via `ng serve`.

2. Set a breakpoint in **app.e2e-spec.ts** on a line in one of the end-to-end tests.

4. After the test run, go to the Debug view, select the **'ng e2e'** configuration, then press F5 or click the green button.

Notice: You might need to update the `"protocol"` property to `legacy` if you are using an older version of Node (older than Node 8)
6 changes: 3 additions & 3 deletions Angular-SpaTemplates/README.md
Expand Up @@ -15,7 +15,7 @@ This recipe shows how to use both the [Debugger for Chrome](https://github.com/M
- .NET Core SDK 1.0 RC4 (or later) for Windows, Mac, or Linux

( See: [Building Single Page Applications on ASP.NET Core with JavaScriptServices](https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/) )

- Node.js, version 6 or later

## Getting Started
Expand Down Expand Up @@ -48,7 +48,7 @@ This recipe shows how to use both the [Debugger for Chrome](https://github.com/M
```

Vscode might ask: "Required assets to build and debug are missing from your project. Add them?"
If so, choose Yes. This will add a .vscode directory with a launch.json and tasks.json file.
If so, choose Yes. This will add a .vscode directory with a launch.json and tasks.json file.

## Configure launch.json File

Expand Down Expand Up @@ -87,7 +87,7 @@ Then click on the gear icon to configure a launch.json file:
"request": "launch",
"name": "Chrome",
"url": "http://localhost:5000",
"webRoot": "${workspaceRoot}/wwwroot"
"webRoot": "${workspaceFolder}/wwwroot"
}
],
"compounds": [
Expand Down
14 changes: 7 additions & 7 deletions Docker-TypeScript/.vscode/launch.json
Expand Up @@ -10,12 +10,12 @@
"name": "Launch Program",
"program": "${workspaceFolder}/src/index.ts",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
],
"env": {
"NODE_ENV": "development"
}
},
},
{
"type": "node",
"request": "launch",
Expand All @@ -27,10 +27,10 @@
"port": 5858,
"restart": true,
"timeout": 60000,
"localRoot": "${workspaceRoot}",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/server",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
Expand All @@ -43,10 +43,10 @@
"protocol": "auto",
"port": 5858,
"restart": true,
"localRoot": "${workspaceRoot}",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/server",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
]
},
{
Expand All @@ -62,7 +62,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
]
}
]
Expand Down
8 changes: 4 additions & 4 deletions Docker-TypeScript/README.md
Expand Up @@ -176,10 +176,10 @@ For attaching the VS Code node debugger to the server running in the Docker cont
"preLaunchTask": "tsc-watch",
"port": 9222,
"restart": true,
"localRoot": "${workspaceRoot}",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/server",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
]
}
]
Expand Down Expand Up @@ -217,10 +217,10 @@ Instead of launching Docker from the command line and then attaching the debugge
"port": 9222,
"restart": true,
"timeout": 60000,
"localRoot": "${workspaceRoot}",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/server",
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
"${workspaceFolder}/dist/**/*.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
Expand Down
16 changes: 8 additions & 8 deletions Electron/README.md
Expand Up @@ -15,7 +15,7 @@ This recipe shows how to use the built-in Node Debugger and the [Debugger for Ch
2. Make sure to the latest version of [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) extension installed in VS Code.

3. This guide assumes that you are using the [electron-Quick-start project](https://github.com/electron/electron-quick-start). Clone the repo to get started
>
>
```
git clone https://github.com/electron/electron-quick-start.git
cd electron-quick-start
Expand All @@ -41,21 +41,21 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
"request": "launch",
"name": "Electron: Main",
"protocol": "inspector",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"runtimeArgs": [
"--remote-debugging-port=9223",
"."
],
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
}
},
{
"name": "Electron: Renderer",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "${workspaceRoot}",
"webRoot": "${workspaceFolder}",
"timeout": 30000
}
],
Expand All @@ -72,7 +72,7 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
```

## Debugging of the main process

1. Go ahead and set a breakpoint in **main.js** on `line 16` within the `createWindow` function.

2. Go to the Debug view, select the **'Electron: Main'** configuration, then press F5 or click the green play button.
Expand All @@ -96,7 +96,7 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
test()
```

2. While your debug session is running you can go to the Debug view, select the **'Electron: Renderer'**, which will connect VS Code to the Electron renderer process.
2. While your debug session is running you can go to the Debug view, select the **'Electron: Renderer'**, which will connect VS Code to the Electron renderer process.

3. When connected go to `renderer.js` and set a breakpoint on `line 6`

Expand All @@ -108,10 +108,10 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*

## Debugging of both processes at the same time

Now that you have learned to debug both the Main and the Renderer process you can take advantage of our [`compounds configurations`](https://code.visualstudio.com/updates/v1_8#_multitarget-debugging) that enables you to start multiple debugging sessions at the same time.
Now that you have learned to debug both the Main and the Renderer process you can take advantage of our [`compounds configurations`](https://code.visualstudio.com/updates/v1_8#_multitarget-debugging) that enables you to start multiple debugging sessions at the same time.

1. Go to the Debug view, select the **'Electron: All'**, which will connect VS Code to the both Main and Renderer process, and enable you to have a smooth development workflow.
2. Set breakpoints in any of the files like above.
3. Party 🎉🔥
3. Party 🎉🔥


2 changes: 1 addition & 1 deletion MERN-Starter/README.md
Expand Up @@ -44,7 +44,7 @@ VS Code automatically detects a MERN based project and creates this launch confi
"runtimeArgs": [
"--inspect=9222"
],
"program": "${workspaceRoot}/index.js",
"program": "${workspaceFolder}/index.js",
"port": 9222,
"restart": true,
"env": {
Expand Down
18 changes: 9 additions & 9 deletions Next-js/README.md
Expand Up @@ -2,7 +2,7 @@

by [Kenneth Auchenberg](https://twitter.com/auchenberg)

This recipe shows how to use the built-in Node Debugger and the [Debugger for Chrome](https://github.com/Microsoft/vscode-chrome-debug) extension with VS Code to debug [next.js](https://github.com/zeit/next.js) applications.
This recipe shows how to use the built-in Node Debugger and the [Debugger for Chrome](https://github.com/Microsoft/vscode-chrome-debug) extension with VS Code to debug [next.js](https://github.com/zeit/next.js) applications.

Next.js allows ReactJS to be used both on the server and client, which is a great match for VS Code, as we can debug both the server and client at the same time! This means that you'll need to use two debugger instances within VS Code to debug both ends. This is the reason for why you'll need both the built-in Node Debugger and the [Debugger for Chrome](https://github.com/Microsoft/vscode-chrome-debug).

Expand All @@ -15,7 +15,7 @@ Next.js allows ReactJS to be used both on the server and client, which is a grea
2. Make sure to the latest version of [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) extension installed in VS Code.

3. This guide assumes that you are using the official sample app [nextgram](https://github.com/zeit/nextgram). Clone the repo to get started
>
>
```
git clone git@github.com:now-examples/nextgram.git
cd nextgram
Expand Down Expand Up @@ -45,7 +45,7 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
"request": "launch",
"name": "Next: Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}"
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
Expand All @@ -69,11 +69,11 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*
```

## Debugging of the Node process

1. Go to the Debug view, select the **'Next: Node'** configuration, then press F5 or click the green play button.

2. VS Code should now attempt to start your Next app.
2. VS Code should now attempt to start your Next app.

3. Go ahead and set a breakpoint in **pages/index.js** on `line 56` within the `render` function.

![breakpoint-main](breakpoint_node.png)
Expand All @@ -84,7 +84,7 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*

## Debugging of the renderer (Chrome) process

1. While your debug session is running you can go to the Debug view, select the **'Next: Chrome'**, which will launch Google Chrome and connect VS Code to the renderer process.
1. While your debug session is running you can go to the Debug view, select the **'Next: Chrome'**, which will launch Google Chrome and connect VS Code to the renderer process.

3. When connected go to `component/modal.js` and set a breakpoint on `line 16`

Expand All @@ -96,10 +96,10 @@ Then click on the gear icon to configure a launch.json file, selecting **Chrome*

## Debugging of both Node and Chrome at the same time

Now that you have learned to debug both the Main and the Renderer process you can take advantage of our [`compounds configurations`](https://code.visualstudio.com/updates/v1_8#_multitarget-debugging) that enables you to start multiple debugging sessions at the same time.
Now that you have learned to debug both the Main and the Renderer process you can take advantage of our [`compounds configurations`](https://code.visualstudio.com/updates/v1_8#_multitarget-debugging) that enables you to start multiple debugging sessions at the same time.

1. Go to the Debug view, select the **'Next: All'**, which will connect VS Code to the both Main and Renderer process, and enable you to have a smooth development workflow.
2. Set breakpoints in any of the files like above.
3. Party 🎉🔥
3. Party 🎉🔥


6 changes: 3 additions & 3 deletions debugging-jest-tests/.vscode/launch.json
@@ -1,11 +1,11 @@
{
"version": "0.2.0",
"configurations": [
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceRoot}/node_modules/jest/bin/jest",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--runInBand"
],
Expand All @@ -16,7 +16,7 @@
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceRoot}/node_modules/jest/bin/jest",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"${file}"
],
Expand Down
4 changes: 2 additions & 2 deletions debugging-jest-tests/README.md
Expand Up @@ -27,7 +27,7 @@ To try the example you'll need to install dependencies by running:
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceRoot}/node_modules/jest/bin/jest",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
Expand All @@ -36,7 +36,7 @@ To try the example you'll need to install dependencies by running:
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceRoot}/node_modules/jest/bin/jest",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
Expand Down

0 comments on commit 797ca80

Please sign in to comment.