0

I'm developing an plugin, and it works well in debug mode(with F5 to run the debug mode). But after package it into a vsix(using vsce package), the plugin doesn't work. In fact, when i check the extension in the runtime state, it shows that the extension is Not yet activated. I guess there are something different bewteen debug mode and vsix mode. If there are any methods to check what's wrong in vsix mode please?

Update: In fact, looks like has something to do with the axios library. I'm using the axios lib as follows:

import axios  from "axios";
let result = []
try{
result = await axios.get(url)
.then((response)=>{
result = [123]
})
.catch((err)=>{
console.err(err)
   result = []
})
} catch (err){
   result = []
}
return result

When i comment out the axios request, the extension in vsix mode will activate. But it really bother me what's wrong with the axios method, because it works well in debug mode, and i have catched all exception. Meanwhile, the vsix is installed on the same machine as the one runing in debug mode.

Is there any method could i know what happend in vsix mode please?

Thanks a lot

muxiao
  • 41
  • 2
  • https://stackoverflow.com/questions/30765782/what-is-the-use-of-the-developer-tools-in-vs-code Check VS Code Developer Tools. – Lex Li Dec 07 '22 at 02:35

2 Answers2

0

I had the same problem as you, but I checked the dev tools and this is the message prompted, I don't know why axios doesn't existenter image description here

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 19 '23 at 07:02
0

Please check if your Axios exists in dependencies, if not please move it here, doing so solved my problem