0

I've created a VSCode extension that integrates with VSCode's Debugger. I have been testing this extension with great success in the extension development debugger. However, when I published this on VSCode Marketplace and installed the extension on my local machine, I'm not able to fire up the extension debugger integration.

I have used numerous console.debug statements to track where the error is originating from, and I have tracked it to a 3rd-party library which essentially analyzes the input source file, and then opens said file in the VSCode Debugger and make it ready for debugging.

This extension that I've been trying out has been a fork of an existing similar project, but I have made some changes to it in my version of it. The original extension (from which I forked) works absolutely fine without any errors; it's just my version that seems to be erroring out.

Why is the case? Or better, how can I essentially debug this (note that my extension works fine during extension debugging).

Couple of caveats I'm.

  1. I've used both devDependencies and dependencies within my package.json file. I read somewhere (don't have the link unfortunately) that vsce package only packages the libraries in the dependencies folder. However, the 3rd-party library I've tracked is the problem is within the dependencies folder, so am unsure of this.
Marcus
  • 3
  • 3
  • If an error occurred, VSCode should log it somewhere. What do the logs say? – Matt Hatcher Jun 08 '22 at 15:48
  • I just see a "could not read" error. I've tried debugging this via console.debug lines, to compare with the original extension's, but everything seems tipsy. Note that the extension in the VSCode extension debugger works, whereas I get errors in production. Not sure wy that's the case. Both environments (files and folder structure) are maintained b/w both. – Marcus Jun 08 '22 at 16:09
  • Might want to give [this](https://stackoverflow.com/a/54381900) a shot and see if you can find more detailed errors. – Matt Hatcher Jun 08 '22 at 16:20
  • Just tried this, but unfortunately the console output (on using the Developer tools) proves to be more helpful. However, since the error is within the 3rd-party library, there are no console statements for that. – Marcus Jun 08 '22 at 17:40
  • The error should still be from a compiled script file which may be able to point you to the source file. – Matt Hatcher Jun 08 '22 at 17:52
  • Unsure. Is there a way to personally update code from within the VSCode extension on my local machine (like where the VSCode extensions folder is)? It's similar to updating node_modules and then using something like `npm cache clean` to force-use that. Any ideas? I was able to locate that folder and made changes, but VSCode didn't pick those up. – Marcus Jun 08 '22 at 18:09
  • You could take a look at `%USERPROFILE%\.vscode\extensions` (if you're on Windows) and start there. – Matt Hatcher Jun 08 '22 at 18:12
  • I've already done so and made changes, but VSCode isn't picking those changes up – Marcus Jun 08 '22 at 18:24

0 Answers0