Skip to content

Commit

Permalink
fix: reenable vscode debug stepping (#1560)
Browse files Browse the repository at this point in the history
* fix: correct program and cwd props in launch.json for VSCode debugging
* fix: set tsconfig srcRoot so debug stepping works. The files are moved as part of `npm run build` so
the sources in the .js.maps needs to be set accordingly, which is what the sourceRoot property does here.
* docs: update readme to match new launch.json
* fix: add payloadFile arg to json to match readme launch.json
* fix: match readme to actual launch.json again

---------

Co-authored-by: Stan Stanislaus <[email protected]>
  • Loading branch information
Stan-Stani and Stan Stanislaus authored Nov 3, 2023
1 parent 5d3b186 commit aa1b2d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"version": "0.2.0",
"version": "0.3.0",
"configurations":
[
{
"name": "Generate Release Notes Console Tester",
"program": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/v3/testconsole/GenerateReleaseNotesConsoleTester.js",
"program": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/testconsole/GenerateReleaseNotesConsoleTester.js",
"request": "launch",
"cwd": "${workspaceRoot}/Extensions/XplatGenerateReleaseNotes/v3/testconsole",
"cwd": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/testconsole",
"type": "node",
"args": [
"--filename", "build-settings.json",
"--pat", "<pat>",
"--githubpat", "<pat>",
"--bitbucketuser", "<user>",
"--bitbucketsecret", "<secret>"]
"--bitbucketsecret", "<secret>",
"--payloadFile", "<file>"
]
},

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,32 @@ To dump this JSON data, set the following values in the configuration file
### Visual Studio Code
You can debug the task using Visual Studio Code. To do this have a `launch.json` file with the following configuration

```
```json
{
"version": "0.2.0",
"version": "0.3.0",
"configurations":
[
{
"name": "Generate Release Notes Console Tester",
"program": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/v3/testconsole/GenerateReleaseNotesConsoleTester.js",
"program": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/testconsole/GenerateReleaseNotesConsoleTester.js",
"request": "launch",
"cwd": "${workspaceRoot}/Extensions/XplatGenerateReleaseNotes/v3/testconsole",
"cwd": "${workspaceFolder}/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/testconsole",
"type": "node",
"args": [
"--filename", "build-settings.json",
"args": [
"--filename", "build-settings.json",
"--pat", "<pat>",
"--githubpat", "<pat>",
"--bitbucketuser", "<user>",
"--bitbucketsecret", "<secret>",
"--payloadFile", "<file>"]
"--payloadFile", "<file>"
]
},

{
"name": "PowerShell - current file",
"type": "PowerShell",
"request": "launch",
"script": "${file}"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"src/",
"test/",
"testconsole/"
]
],
"sourceRoot": "../"
},
"exclude": [
"node_modules"
Expand Down

0 comments on commit aa1b2d8

Please sign in to comment.