vscode_deno: Debugger not working, Unable to retrieve source content from standard library

I press f5 in mod.ts to debug, choose deno, but then a file called colors.ts appears with:

Could not load source '/home/xx/workspace-directory/std@0.70.0/fmt/colors.ts': Unable to retrieve source content.

The repo is https://github.com/David-Else/eslint-config-octopus and video: out

Versions

vscode: 1.49.1 deno: 1.4.1 extension: 2.3.1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 16
  • Comments: 15 (2 by maintainers)

Most upvoted comments

I’m getting this error with the sample web server from the manual

https://deno.land/manual/examples/http_server

Could not load source '/home/user/src/app/server/std@0.71.0/encoding/utf8.ts': Unable to retrieve source content.

This is related to denoland/deno#11874. I believe fixing the source maps will fix this issue.

To all people in this thread, you seem to be having two different issues.

One of them is that the inspector is pausing everytime you start it, forcing you to resume it as is the case of @edualb . That can be easily fixed by not using --inspect-brk but --inspect on your launch configuration. --inspect-brk is meant to pause on the first line of code executed, causing that “annoyance”, even though it’s working as intended.

The second one is the fact that the inspector can’t debug remote code correctly, causing the Could not load source '/home/user/src/app/server/std@0.71.0/encoding/utf8.ts': Unable to retrieve source content. error. This should only be a problem if you really want to debug third party code.