Skip to content

feat: make deno easier to configure#1348

Merged
connor4312 merged 2 commits intomainfrom
deno-easy-config
Aug 1, 2022
Merged

feat: make deno easier to configure#1348
connor4312 merged 2 commits intomainfrom
deno-easy-config

Conversation

@connor4312
Copy link
Member

@connor4312 connor4312 commented Jul 31, 2022

Previously deno required manually configuring runtimeArgs and port
flags, with manual selection of the debug port to use[1]

This adds a little bit of extra logic so that all the necessary
configuration for Deno is automatically wired up whenever the user sets
their runtimeExectuable to deno. For example, this now works:

{
  "type": "node"
  "name": "Launch Program",
  "program": "${workspaceFolder}/hello.ts",
  "runtimeExecutable": "deno",
  "request": "launch",
}

Where previously it was:

{
  "type": "node"
  "name": "Launch Program",
  "program": "${workspaceFolder}/hello.ts",
  "runtimeExecutable": "deno",
  "request": "launch",
  "attachSimplePort": "9229",
  "continueOnAttach": true,
  "runtimeArgs": ["run", "--inspect-brk=127.0.0.1:9229", "--allow-all"]
}

Note that continueOnAttach doesn't quite work pending denoland/deno#15360

  1. https://medium.com/deno-the-complete-reference/run-and-debug-deno-applications-in-vscode-b6e3bff217f

@connor4312 connor4312 enabled auto-merge (squash) July 31, 2022 17:46
Previously deno required manually configuring runtimeArgs and port
flags, with manual selection of the debug port to use[1]

This adds a little bit of extra logic so that all the necessary
configuration for Deno is automatically wired up whenever the user sets
their runtimeExectuable to `deno`. For example, this now works:

```json
{
  "type": "node"
  "name": "Launch Program",
  "program": "${workspaceFolder}/hello.ts",
  "runtimeExecutable": "deno",
  "request": "launch",
}
```

Where previously it was:

```json
{
  "type": "node"
  "name": "Launch Program",
  "program": "${workspaceFolder}/hello.ts",
  "runtimeExecutable": "deno",
  "request": "launch",
  "attachSimplePort": "9229",
  "continueOnAttach": true,
  "runtimeArgs": ["run", "--inspect-brk=127.0.0.1:9229", "--allow-all"]
}
```

1. https://medium.com/deno-the-complete-reference/run-and-debug-deno-applications-in-vscode-b6e3bff217f
@connor4312 connor4312 merged commit 2240e07 into main Aug 1, 2022
@connor4312 connor4312 deleted the deno-easy-config branch August 1, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants